In [1]:
from __future__ import print_function, division

In [2]:
# This changes the current directory to the base saga directory - make sure to run this first!
# This is necessary to be able to import the py files and use the right directories,
# while keeping all the notebooks in their own directory.
import os
import sys
import time

if 'saga_base_dir' not in locals():
    saga_base_dir = os.path.abspath('..')
if saga_base_dir not in sys.path:
    os.chdir(saga_base_dir)

In [3]:
for module in ['hosts', 'targeting', 'utils']:
    if module in globals():
        reload(globals()[module])
    else:
        globals()[module] = __import__(module)
#g = targeting.get_gama() #re-caches the gama catalog

In [4]:
%matplotlib inline
from matplotlib import pyplot as plt
from matplotlib import rcParams

rcParams['figure.figsize'] = (16, 10)
rcParams['image.interpolation'] = 'none'
rcParams['image.origin'] = 'lower'

In [265]:
import time
import shutil

from lxml import html
import numpy  as np
np.seterr(invalid='ignore', divide='ignore')

from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.io import fits
from astropy.utils.data import get_file_contents, download_file
from astropy.table import Table, vstack

In [34]:
anaK_coo = SkyCoord(354.13105403*u.deg, 0.29726505 *u.deg, distance=34.4*u.Mpc)

In [7]:
brickurl = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/decals-bricks.fits'
bricktab = Table(fits.HDUList.fromstring(get_file_contents(brickurl, cache=True))[1].data)

#re-assign the "has" columns from integers to bools
for cname in bricktab.colnames:
    if cname.startswith('has_'):
        bricktab[cname].dtype = bool

In [8]:
hasall = bricktab['has_image_g']&bricktab['has_image_r']&bricktab['has_image_z']&bricktab['has_catalog']
allbricktab = bricktab[hasall]

In [271]:
def point_in_brick(bricktab, raorsc, dec=None):
    if dec is None:
        ra = raorsc.ra
        dec = raorsc.dec
    else:
        ra = raorsc
    ra1msk = bricktab['ra1']<ra.deg
    ra2msk = ra.deg<bricktab['ra2']
    dec1msk = bricktab['dec1']<dec.deg
    dec2msk = dec.deg<bricktab['dec2']
    return ra1msk&ra2msk&dec1msk&dec2msk

def circle_in_brick(bricktab, center, radius):
    
    ras = [[b['ra1'], b['ra1'], b['ra2'], b['ra2']] for b in bricktab]
    decs = [[b['dec1'], b['dec2'], b['dec1'], b['dec2']] for b in bricktab]
    
    
    if radius.unit.is_equivalent(u.deg):
        brickcorners = SkyCoord(ras*u.deg, decs*u.deg)
        brickcornersin = anaK_coo.separation(brickcorners) < radius
    elif radius.unit.is_equivalent(u.kpc):
        brickcorners = SkyCoord(ras*u.deg, decs*u.deg, distance=center.distance)
        brickcornersin = anaK_coo.separation_3d(brickcorners) < radius
        #radius = ((radius/center.distance)*u.rad).to(u.deg)
    else:
        raise ValueError('invalid unit on radius')
        
    return np.any(brickcornersin, axis=1)

In [64]:
anakonlyin = inbrick(allbricktab, anaK_coo.ra, anaK_coo.dec)
anakin = circle_in_brick(allbricktab, anaK_coo, 400*u.kpc)
np.sum(anakonlyin), np.sum(anakin)


Out[64]:
(1, 34)

In [65]:
basecaturl = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/'
baseimurl = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/'

caturls = []
imdirsurls = []
for entry in allbricktab[anakin]:
    brickname = entry['brickname']
    dirname = brickname[:3]
    caturls.append(basecaturl + '{dirname}/tractor-{brickname}.fits'.format(**locals()))
    imdirsurls.append(baseimurl + '{dirname}/{brickname}/'.format(**locals()))

In [87]:
#download the images to a local dir because they are quite big
todl = []
for imdir in imdirsurls:
    tree = html.parse(imdir)
    hrefs = [a.attrib['href'] for a in tree.findall(".//a")]
    #todl.extend([imdir+href for href in hrefs if '-image' in href or '-model' in href or '-resid' in href])
    todl.extend([imdir+href for href in hrefs if '-image-r.fits' in href or 
                                                 '-image.jpg' in href or 
                                                 '-model-r.fits.gz' in href or
                                                 '-model.jpg' in href])
print([i.split('/')[-1] for i in todl])


['decals-3536m002-image-r.fits', 'decals-3536m002-image.jpg', 'decals-3536m002-model-r.fits.gz', 'decals-3536m002-model.jpg', 'decals-3538m002-image-r.fits', 'decals-3538m002-image.jpg', 'decals-3538m002-model-r.fits.gz', 'decals-3538m002-model.jpg', 'decals-3541m002-image-r.fits', 'decals-3541m002-image.jpg', 'decals-3541m002-model-r.fits.gz', 'decals-3541m002-model.jpg', 'decals-3543m002-image-r.fits', 'decals-3543m002-image.jpg', 'decals-3543m002-model-r.fits.gz', 'decals-3543m002-model.jpg', 'decals-3546m002-image-r.fits', 'decals-3546m002-image.jpg', 'decals-3546m002-model-r.fits.gz', 'decals-3546m002-model.jpg', 'decals-3533p000-image-r.fits', 'decals-3533p000-image.jpg', 'decals-3533p000-model-r.fits.gz', 'decals-3533p000-model.jpg', 'decals-3536p000-image-r.fits', 'decals-3536p000-image.jpg', 'decals-3536p000-model-r.fits.gz', 'decals-3536p000-model.jpg', 'decals-3538p000-image-r.fits', 'decals-3538p000-image.jpg', 'decals-3538p000-model-r.fits.gz', 'decals-3538p000-model.jpg', 'decals-3541p000-image-r.fits', 'decals-3541p000-image.jpg', 'decals-3541p000-model-r.fits.gz', 'decals-3541p000-model.jpg', 'decals-3543p000-image-r.fits', 'decals-3543p000-image.jpg', 'decals-3543p000-model-r.fits.gz', 'decals-3543p000-model.jpg', 'decals-3546p000-image-r.fits', 'decals-3546p000-image.jpg', 'decals-3546p000-model-r.fits.gz', 'decals-3546p000-model.jpg', 'decals-3548p000-image-r.fits', 'decals-3548p000-image.jpg', 'decals-3548p000-model-r.fits.gz', 'decals-3548p000-model.jpg', 'decals-3533p002-image-r.fits', 'decals-3533p002-image.jpg', 'decals-3533p002-model-r.fits.gz', 'decals-3533p002-model.jpg', 'decals-3536p002-image-r.fits', 'decals-3536p002-image.jpg', 'decals-3536p002-model-r.fits.gz', 'decals-3536p002-model.jpg', 'decals-3538p002-image-r.fits', 'decals-3538p002-image.jpg', 'decals-3538p002-model-r.fits.gz', 'decals-3538p002-model.jpg', 'decals-3541p002-image-r.fits', 'decals-3541p002-image.jpg', 'decals-3541p002-model-r.fits.gz', 'decals-3541p002-model.jpg', 'decals-3543p002-image-r.fits', 'decals-3543p002-image.jpg', 'decals-3543p002-model-r.fits.gz', 'decals-3543p002-model.jpg', 'decals-3546p002-image-r.fits', 'decals-3546p002-image.jpg', 'decals-3546p002-model-r.fits.gz', 'decals-3546p002-model.jpg', 'decals-3548p002-image-r.fits', 'decals-3548p002-image.jpg', 'decals-3548p002-model-r.fits.gz', 'decals-3548p002-model.jpg', 'decals-3533p005-image-r.fits', 'decals-3533p005-image.jpg', 'decals-3533p005-model-r.fits.gz', 'decals-3533p005-model.jpg', 'decals-3536p005-image-r.fits', 'decals-3536p005-image.jpg', 'decals-3536p005-model-r.fits.gz', 'decals-3536p005-model.jpg', 'decals-3538p005-image-r.fits', 'decals-3538p005-image.jpg', 'decals-3538p005-model-r.fits.gz', 'decals-3538p005-model.jpg', 'decals-3541p005-image-r.fits', 'decals-3541p005-image.jpg', 'decals-3541p005-model-r.fits.gz', 'decals-3541p005-model.jpg', 'decals-3543p005-image-r.fits', 'decals-3543p005-image.jpg', 'decals-3543p005-model-r.fits.gz', 'decals-3543p005-model.jpg', 'decals-3546p005-image-r.fits', 'decals-3546p005-image.jpg', 'decals-3546p005-model-r.fits.gz', 'decals-3546p005-model.jpg', 'decals-3548p005-image-r.fits', 'decals-3548p005-image.jpg', 'decals-3548p005-model-r.fits.gz', 'decals-3548p005-model.jpg', 'decals-3536p007-image-r.fits', 'decals-3536p007-image.jpg', 'decals-3536p007-model-r.fits.gz', 'decals-3536p007-model.jpg', 'decals-3538p007-image-r.fits', 'decals-3538p007-image.jpg', 'decals-3538p007-model-r.fits.gz', 'decals-3538p007-model.jpg', 'decals-3541p007-image-r.fits', 'decals-3541p007-image.jpg', 'decals-3541p007-model-r.fits.gz', 'decals-3541p007-model.jpg', 'decals-3543p007-image-r.fits', 'decals-3543p007-image.jpg', 'decals-3543p007-model-r.fits.gz', 'decals-3543p007-model.jpg', 'decals-3546p007-image-r.fits', 'decals-3546p007-image.jpg', 'decals-3546p007-model-r.fits.gz', 'decals-3546p007-model.jpg', 'decals-3538p010-image-r.fits', 'decals-3538p010-image.jpg', 'decals-3538p010-model-r.fits.gz', 'decals-3538p010-model.jpg', 'decals-3541p010-image-r.fits', 'decals-3541p010-image.jpg', 'decals-3541p010-model-r.fits.gz', 'decals-3541p010-model.jpg', 'decals-3543p010-image-r.fits', 'decals-3543p010-image.jpg', 'decals-3543p010-model-r.fits.gz', 'decals-3543p010-model.jpg']

In [88]:
dlednames = []
for i, url in enumerate(todl):
    print('On file', i+1, 'of', len(todl))
    targetname = os.path.join('decals_images', url.split('/')[-1])
    dlednames.append(targetname)
    if os.path.isfile(targetname):
        print('File', targetname, 'exists, skipping')
        continue
    st = time.time()
    dlname = download_file(url, cache=False)
    print('Took', time.time()-st, 'sec. Moving', dlname, 'to', targetname)
    shutil.move(dlname, targetname)


On file 1 of 136
File decals_images/decals-3536m002-image-r.fits exists, skipping
On file 2 of 136
File decals_images/decals-3536m002-image.jpg exists, skipping
On file 3 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536m002/decals-3536m002-model-r.fits.gz [Done]
Took 52.4696760178 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpe7IMyb to decals_images/decals-3536m002-model-r.fits.gz
On file 4 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536m002/decals-3536m002-model.jpg [Done]
Took 1.33755207062 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpkMxAV5 to decals_images/decals-3536m002-model.jpg
On file 5 of 136
File decals_images/decals-3538m002-image-r.fits exists, skipping
On file 6 of 136
File decals_images/decals-3538m002-image.jpg exists, skipping
On file 7 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538m002/decals-3538m002-model-r.fits.gz [Done]
Took 64.2111768723 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpsJDxho to decals_images/decals-3538m002-model-r.fits.gz
On file 8 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538m002/decals-3538m002-model.jpg [Done]
Took 1.52127194405 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmptEd3sI to decals_images/decals-3538m002-model.jpg
On file 9 of 136
File decals_images/decals-3541m002-image-r.fits exists, skipping
On file 10 of 136
File decals_images/decals-3541m002-image.jpg exists, skipping
On file 11 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541m002/decals-3541m002-model-r.fits.gz [Done]
Took 52.3553369045 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpd4KOUT to decals_images/decals-3541m002-model-r.fits.gz
On file 12 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541m002/decals-3541m002-model.jpg [Done]
Took 1.40900683403 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpUdejBO to decals_images/decals-3541m002-model.jpg
On file 13 of 136
File decals_images/decals-3543m002-image-r.fits exists, skipping
On file 14 of 136
File decals_images/decals-3543m002-image.jpg exists, skipping
On file 15 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543m002/decals-3543m002-model-r.fits.gz [Done]
Took 38.1355791092 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpvUGIqm to decals_images/decals-3543m002-model-r.fits.gz
On file 16 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543m002/decals-3543m002-model.jpg [Done]
Took 1.38979291916 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpN8tEdk to decals_images/decals-3543m002-model.jpg
On file 17 of 136
File decals_images/decals-3546m002-image-r.fits exists, skipping
On file 18 of 136
File decals_images/decals-3546m002-image.jpg exists, skipping
On file 19 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546m002/decals-3546m002-model-r.fits.gz [Done]
Took 55.613519907 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpPmRyaH to decals_images/decals-3546m002-model-r.fits.gz
On file 20 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546m002/decals-3546m002-model.jpg [Done]
Took 10.7394311428 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpEMydZt to decals_images/decals-3546m002-model.jpg
On file 21 of 136
File decals_images/decals-3533p000-image-r.fits exists, skipping
On file 22 of 136
File decals_images/decals-3533p000-image.jpg exists, skipping
On file 23 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p000/decals-3533p000-model-r.fits.gz [Done]
Took 81.9651710987 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpK9fXJK to decals_images/decals-3533p000-model-r.fits.gz
On file 24 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p000/decals-3533p000-model.jpg [Done]
Took 2.1116771698 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpD6MzvO to decals_images/decals-3533p000-model.jpg
On file 25 of 136
File decals_images/decals-3536p000-image-r.fits exists, skipping
On file 26 of 136
File decals_images/decals-3536p000-image.jpg exists, skipping
On file 27 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p000/decals-3536p000-model-r.fits.gz [Done]
Took 7.42922687531 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpPkFEC5 to decals_images/decals-3536p000-model-r.fits.gz
On file 28 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p000/decals-3536p000-model.jpg [Done]
Took 1.31189703941 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmps7pecn to decals_images/decals-3536p000-model.jpg
On file 29 of 136
File decals_images/decals-3538p000-image-r.fits exists, skipping
On file 30 of 136
File decals_images/decals-3538p000-image.jpg exists, skipping
On file 31 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p000/decals-3538p000-model-r.fits.gz [Done]
Took 62.5446019173 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpVymcrd to decals_images/decals-3538p000-model-r.fits.gz
On file 32 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p000/decals-3538p000-model.jpg [Done]
Took 2.44164299965 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp7fc3WW to decals_images/decals-3538p000-model.jpg
On file 33 of 136
File decals_images/decals-3541p000-image-r.fits exists, skipping
On file 34 of 136
File decals_images/decals-3541p000-image.jpg exists, skipping
On file 35 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p000/decals-3541p000-model-r.fits.gz [Done]
Took 32.7477481365 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmprSWsm0 to decals_images/decals-3541p000-model-r.fits.gz
On file 36 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p000/decals-3541p000-model.jpg [Done]
Took 1.42738413811 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpAnjKRs to decals_images/decals-3541p000-model.jpg
On file 37 of 136
File decals_images/decals-3543p000-image-r.fits exists, skipping
On file 38 of 136
File decals_images/decals-3543p000-image.jpg exists, skipping
On file 39 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p000/decals-3543p000-model-r.fits.gz [Done]
Took 21.2617890835 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpxEdwpY to decals_images/decals-3543p000-model-r.fits.gz
On file 40 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p000/decals-3543p000-model.jpg [Done]
Took 1.3609790802 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpmQl8SW to decals_images/decals-3543p000-model.jpg
On file 41 of 136
File decals_images/decals-3546p000-image-r.fits exists, skipping
On file 42 of 136
File decals_images/decals-3546p000-image.jpg exists, skipping
On file 43 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p000/decals-3546p000-model-r.fits.gz [Done]
Took 49.0024700165 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpduHgTw to decals_images/decals-3546p000-model-r.fits.gz
On file 44 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p000/decals-3546p000-model.jpg [Done]
Took 1.36896681786 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpzrTNG_ to decals_images/decals-3546p000-model.jpg
On file 45 of 136
File decals_images/decals-3548p000-image-r.fits exists, skipping
On file 46 of 136
File decals_images/decals-3548p000-image.jpg exists, skipping
On file 47 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p000/decals-3548p000-model-r.fits.gz [Done]
Took 43.0316538811 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp0r4QSW to decals_images/decals-3548p000-model-r.fits.gz
On file 48 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p000/decals-3548p000-model.jpg [Done]
Took 1.42477607727 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpoB9re1 to decals_images/decals-3548p000-model.jpg
On file 49 of 136
File decals_images/decals-3533p002-image-r.fits exists, skipping
On file 50 of 136
File decals_images/decals-3533p002-image.jpg exists, skipping
On file 51 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p002/decals-3533p002-model-r.fits.gz [Done]
Took 49.2336080074 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpTRFyYE to decals_images/decals-3533p002-model-r.fits.gz
On file 52 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p002/decals-3533p002-model.jpg [Done]
Took 1.3766450882 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpzwhh8X to decals_images/decals-3533p002-model.jpg
On file 53 of 136
File decals_images/decals-3536p002-image-r.fits exists, skipping
On file 54 of 136
File decals_images/decals-3536p002-image.jpg exists, skipping
On file 55 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p002/decals-3536p002-model-r.fits.gz [Done]
Took 50.3461611271 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpb_8uJQ to decals_images/decals-3536p002-model-r.fits.gz
On file 56 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p002/decals-3536p002-model.jpg [Done]
Took 1.33766412735 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpRAfeJy to decals_images/decals-3536p002-model.jpg
On file 57 of 136
File decals_images/decals-3538p002-image-r.fits exists, skipping
On file 58 of 136
File decals_images/decals-3538p002-image.jpg exists, skipping
On file 59 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p002/decals-3538p002-model-r.fits.gz [Done]
Took 41.0141270161 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpfqKoyg to decals_images/decals-3538p002-model-r.fits.gz
On file 60 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p002/decals-3538p002-model.jpg [Done]
Took 1.45438599586 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpGM8ule to decals_images/decals-3538p002-model.jpg
On file 61 of 136
File decals_images/decals-3541p002-image-r.fits exists, skipping
On file 62 of 136
File decals_images/decals-3541p002-image.jpg exists, skipping
On file 63 of 136
File decals_images/decals-3541p002-model-r.fits.gz exists, skipping
On file 64 of 136
File decals_images/decals-3541p002-model.jpg exists, skipping
On file 65 of 136
File decals_images/decals-3543p002-image-r.fits exists, skipping
On file 66 of 136
File decals_images/decals-3543p002-image.jpg exists, skipping
On file 67 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p002/decals-3543p002-model-r.fits.gz [Done]
Took 40.7850379944 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpJX4_JY to decals_images/decals-3543p002-model-r.fits.gz
On file 68 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p002/decals-3543p002-model.jpg [Done]
Took 1.37232613564 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpWxnkLJ to decals_images/decals-3543p002-model.jpg
On file 69 of 136
File decals_images/decals-3546p002-image-r.fits exists, skipping
On file 70 of 136
File decals_images/decals-3546p002-image.jpg exists, skipping
On file 71 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p002/decals-3546p002-model-r.fits.gz [Done]
Took 9.8875939846 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp1gH5cU to decals_images/decals-3546p002-model-r.fits.gz
On file 72 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p002/decals-3546p002-model.jpg [Done]
Took 1.35064101219 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp_rm5ZI to decals_images/decals-3546p002-model.jpg
On file 73 of 136
File decals_images/decals-3548p002-image-r.fits exists, skipping
On file 74 of 136
File decals_images/decals-3548p002-image.jpg exists, skipping
On file 75 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p002/decals-3548p002-model-r.fits.gz [Done]
Took 27.5627419949 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp6O_3Uv to decals_images/decals-3548p002-model-r.fits.gz
On file 76 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p002/decals-3548p002-model.jpg [Done]
Took 1.29472208023 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpuFgiPF to decals_images/decals-3548p002-model.jpg
On file 77 of 136
File decals_images/decals-3533p005-image-r.fits exists, skipping
On file 78 of 136
File decals_images/decals-3533p005-image.jpg exists, skipping
On file 79 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p005/decals-3533p005-model-r.fits.gz [Done]
Took 54.3968601227 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpDpTZ5f to decals_images/decals-3533p005-model-r.fits.gz
On file 80 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3533p005/decals-3533p005-model.jpg [Done]
Took 2.31502008438 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmplzjX1T to decals_images/decals-3533p005-model.jpg
On file 81 of 136
File decals_images/decals-3536p005-image-r.fits exists, skipping
On file 82 of 136
File decals_images/decals-3536p005-image.jpg exists, skipping
On file 83 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p005/decals-3536p005-model-r.fits.gz [Done]
Took 44.3345060349 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpbGoAHi to decals_images/decals-3536p005-model-r.fits.gz
On file 84 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p005/decals-3536p005-model.jpg [Done]
Took 1.36055612564 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpf8s7a8 to decals_images/decals-3536p005-model.jpg
On file 85 of 136
File decals_images/decals-3538p005-image-r.fits exists, skipping
On file 86 of 136
File decals_images/decals-3538p005-image.jpg exists, skipping
On file 87 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p005/decals-3538p005-model-r.fits.gz [Done]
Took 53.6193509102 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpUpiDbt to decals_images/decals-3538p005-model-r.fits.gz
On file 88 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p005/decals-3538p005-model.jpg [Done]
Took 1.44032597542 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpsRBZZi to decals_images/decals-3538p005-model.jpg
On file 89 of 136
File decals_images/decals-3541p005-image-r.fits exists, skipping
On file 90 of 136
File decals_images/decals-3541p005-image.jpg exists, skipping
On file 91 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p005/decals-3541p005-model-r.fits.gz [Done]
Took 33.652545929 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpSuhzMj to decals_images/decals-3541p005-model-r.fits.gz
On file 92 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p005/decals-3541p005-model.jpg [Done]
Took 1.33238601685 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpotOlxA to decals_images/decals-3541p005-model.jpg
On file 93 of 136
File decals_images/decals-3543p005-image-r.fits exists, skipping
On file 94 of 136
File decals_images/decals-3543p005-image.jpg exists, skipping
On file 95 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p005/decals-3543p005-model-r.fits.gz [Done]
Took 45.3792259693 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpAoKlCM to decals_images/decals-3543p005-model-r.fits.gz
On file 96 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p005/decals-3543p005-model.jpg [Done]
Took 1.47053718567 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpaQlolY to decals_images/decals-3543p005-model.jpg
On file 97 of 136
File decals_images/decals-3546p005-image-r.fits exists, skipping
On file 98 of 136
File decals_images/decals-3546p005-image.jpg exists, skipping
On file 99 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p005/decals-3546p005-model-r.fits.gz [Done]
Took 15.7198939323 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpCBJ4LW to decals_images/decals-3546p005-model-r.fits.gz
On file 100 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p005/decals-3546p005-model.jpg [Done]
Took 1.87923192978 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpfrNVjr to decals_images/decals-3546p005-model.jpg
On file 101 of 136
File decals_images/decals-3548p005-image-r.fits exists, skipping
On file 102 of 136
File decals_images/decals-3548p005-image.jpg exists, skipping
On file 103 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p005/decals-3548p005-model-r.fits.gz [Done]
Took 35.346378088 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpk66ZGA to decals_images/decals-3548p005-model-r.fits.gz
On file 104 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3548p005/decals-3548p005-model.jpg [Done]
Took 1.36777210236 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp0L_0Yk to decals_images/decals-3548p005-model.jpg
On file 105 of 136
File decals_images/decals-3536p007-image-r.fits exists, skipping
On file 106 of 136
File decals_images/decals-3536p007-image.jpg exists, skipping
On file 107 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p007/decals-3536p007-model-r.fits.gz [Done]
Took 31.2477350235 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp0W6Anb to decals_images/decals-3536p007-model-r.fits.gz
On file 108 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3536p007/decals-3536p007-model.jpg [Done]
Took 1.41501402855 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpTqJFxt to decals_images/decals-3536p007-model.jpg
On file 109 of 136
File decals_images/decals-3538p007-image-r.fits exists, skipping
On file 110 of 136
File decals_images/decals-3538p007-image.jpg exists, skipping
On file 111 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p007/decals-3538p007-model-r.fits.gz [Done]
Took 26.3993110657 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpQ04TRE to decals_images/decals-3538p007-model-r.fits.gz
On file 112 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p007/decals-3538p007-model.jpg [Done]
Took 1.37756800652 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp58eKuw to decals_images/decals-3538p007-model.jpg
On file 113 of 136
File decals_images/decals-3541p007-image-r.fits exists, skipping
On file 114 of 136
File decals_images/decals-3541p007-image.jpg exists, skipping
On file 115 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p007/decals-3541p007-model-r.fits.gz [Done]
Took 22.4644701481 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpq6tSHj to decals_images/decals-3541p007-model-r.fits.gz
On file 116 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p007/decals-3541p007-model.jpg [Done]
Took 1.36898803711 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp_DVWKp to decals_images/decals-3541p007-model.jpg
On file 117 of 136
File decals_images/decals-3543p007-image-r.fits exists, skipping
On file 118 of 136
File decals_images/decals-3543p007-image.jpg exists, skipping
On file 119 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p007/decals-3543p007-model-r.fits.gz [Done]
Took 46.9790079594 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpOl20Le to decals_images/decals-3543p007-model-r.fits.gz
On file 120 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p007/decals-3543p007-model.jpg [Done]
Took 1.38837504387 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpiyfsFO to decals_images/decals-3543p007-model.jpg
On file 121 of 136
File decals_images/decals-3546p007-image-r.fits exists, skipping
On file 122 of 136
File decals_images/decals-3546p007-image.jpg exists, skipping
On file 123 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p007/decals-3546p007-model-r.fits.gz [Done]
Took 40.9895179272 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpAbpYEk to decals_images/decals-3546p007-model-r.fits.gz
On file 124 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3546p007/decals-3546p007-model.jpg [Done]
Took 1.45331501961 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmp5wg3dK to decals_images/decals-3546p007-model.jpg
On file 125 of 136
File decals_images/decals-3538p010-image-r.fits exists, skipping
On file 126 of 136
File decals_images/decals-3538p010-image.jpg exists, skipping
On file 127 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p010/decals-3538p010-model-r.fits.gz [Done]
Took 56.8693118095 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpHPMYWC to decals_images/decals-3538p010-model-r.fits.gz
On file 128 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/353/3538p010/decals-3538p010-model.jpg [Done]
Took 1.37723016739 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpVgO_RO to decals_images/decals-3538p010-model.jpg
On file 129 of 136
File decals_images/decals-3541p010-image-r.fits exists, skipping
On file 130 of 136
File decals_images/decals-3541p010-image.jpg exists, skipping
On file 131 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p010/decals-3541p010-model-r.fits.gz [Done]
Took 22.2326889038 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpFTn8nJ to decals_images/decals-3541p010-model-r.fits.gz
On file 132 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3541p010/decals-3541p010-model.jpg [Done]
Took 2.22886300087 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpozpfcw to decals_images/decals-3541p010-model.jpg
On file 133 of 136
File decals_images/decals-3543p010-image-r.fits exists, skipping
On file 134 of 136
File decals_images/decals-3543p010-image.jpg exists, skipping
On file 135 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p010/decals-3543p010-model-r.fits.gz [Done]
Took 10.9573998451 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpoONMJz to decals_images/decals-3543p010-model-r.fits.gz
On file 136 of 136
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/coadd/354/3543p010/decals-3543p010-model.jpg [Done]
Took 1.40652608871 sec. Moving /var/folders/7_/0n3gbrls1sb2vn6xjprw8c280000gn/T/tmpa9nm0C to decals_images/decals-3543p010-model.jpg

In [89]:
#build residual maps for all image/model sets
for fn in dlednames:
    if '-image-' in fn:
        modelfn = fn.replace('-image-', '-model-').replace('.fits', '.fits.gz')
        if modelfn not in dlednames:
            print('Found', fn, 'but no model image', modelfn)
        else:
            residfn = fn.replace('-image-', '-resid-')
            if os.path.isfile(residfn):
                print('Residual file', residfn, 'already exists.  Skipping.')
                continue
            ifn = fits.open(fn)
            modeldata = fits.getdata(modelfn)
            resid = ifn[0].data - modeldata
            ifn[0].data = resid
            print('Writing residual file', residfn)
            ifn.writeto(residfn)


Writing residual file decals_images/decals-3536m002-resid-r.fits
Writing residual file decals_images/decals-3538m002-resid-r.fits
Writing residual file decals_images/decals-3541m002-resid-r.fits
Writing residual file decals_images/decals-3543m002-resid-r.fits
Writing residual file decals_images/decals-3546m002-resid-r.fits
Writing residual file decals_images/decals-3533p000-resid-r.fits
Writing residual file decals_images/decals-3536p000-resid-r.fits
Writing residual file decals_images/decals-3538p000-resid-r.fits
Writing residual file decals_images/decals-3541p000-resid-r.fits
Writing residual file decals_images/decals-3543p000-resid-r.fits
Writing residual file decals_images/decals-3546p000-resid-r.fits
Writing residual file decals_images/decals-3548p000-resid-r.fits
Writing residual file decals_images/decals-3533p002-resid-r.fits
Writing residual file decals_images/decals-3536p002-resid-r.fits
Writing residual file decals_images/decals-3538p002-resid-r.fits
Residual file decals_images/decals-3541p002-resid-r.fits already exists.  Skipping.
Writing residual file decals_images/decals-3543p002-resid-r.fits
Writing residual file decals_images/decals-3546p002-resid-r.fits
Writing residual file decals_images/decals-3548p002-resid-r.fits
Writing residual file decals_images/decals-3533p005-resid-r.fits
Writing residual file decals_images/decals-3536p005-resid-r.fits
Writing residual file decals_images/decals-3538p005-resid-r.fits
Writing residual file decals_images/decals-3541p005-resid-r.fits
Writing residual file decals_images/decals-3543p005-resid-r.fits
Writing residual file decals_images/decals-3546p005-resid-r.fits
Writing residual file decals_images/decals-3548p005-resid-r.fits
Writing residual file decals_images/decals-3536p007-resid-r.fits
Writing residual file decals_images/decals-3538p007-resid-r.fits
Writing residual file decals_images/decals-3541p007-resid-r.fits
Writing residual file decals_images/decals-3543p007-resid-r.fits
Writing residual file decals_images/decals-3546p007-resid-r.fits
Writing residual file decals_images/decals-3538p010-resid-r.fits
Writing residual file decals_images/decals-3541p010-resid-r.fits
Writing residual file decals_images/decals-3543p010-resid-r.fits

In [67]:
#now actually download the catalogs
cattabs = [Table(fits.HDUList.fromstring(get_file_contents(url, cache=True))[1].data) for url in caturls]


Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3536m002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538m002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3541m002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543m002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3546m002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3533p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3536p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3541p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3546p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3548p000.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3533p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3536p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3546p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3548p002.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3533p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3536p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3541p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3546p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3548p005.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3536p007.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538p007.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3541p007.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543p007.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3546p007.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/353/tractor-3538p010.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3541p010.fits [Done]
Downloading http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr1/tractor/354/tractor-3543p010.fits [Done]

Now do actual analysis for AnaK field


In [95]:
cattabs[0]


Out[95]:
<Table masked=False length=6176>
brickidbricknameobjidbrick_primaryblobtyperara_ivardecdec_ivarbxbybx0by0left_blobdecam_flux [6]decam_flux_ivar [6]decam_apflux [6,8]decam_apflux_resid [6,8]decam_apflux_ivar [6,8]decam_mw_transmission [6]decam_nobs [6]decam_rchi2 [6]decam_fracflux [6]decam_fracmasked [6]decam_fracin [6]out_of_boundsdecam_anymask [6]decam_allmask [6]wise_flux [4]wise_flux_ivar [4]wise_mw_transmission [4]wise_nobs [4]wise_fracflux [4]wise_rchi2 [4]dchisq [4]fracDevfracDev_ivarshapeExp_rshapeExp_r_ivarshapeExp_e1shapeExp_e1_ivarshapeExp_e2shapeExp_e2_ivarshapeDev_rshapeDev_r_ivarshapeDev_e1shapeDev_e1_ivarshapeDev_e2shapeDev_e2_ivarebvsdss_runsdss_camcolsdss_fieldsdss_idsdss_objidsdss_parentsdss_nchildsdss_objc_typesdss_objc_flagssdss_objc_flags2sdss_flags [5]sdss_flags2 [5]sdss_tai [5]sdss_rasdss_ra_ivarsdss_decsdss_dec_ivarsdss_psf_fwhm [5]sdss_mjdsdss_theta_dev [5]sdss_theta_deverr [5]sdss_ab_dev [5]sdss_ab_deverr [5]sdss_theta_exp [5]sdss_theta_experr [5]sdss_ab_exp [5]sdss_ab_experr [5]sdss_fracdev [5]sdss_phi_dev_deg [5]sdss_phi_exp_deg [5]sdss_psfflux [5]sdss_psfflux_ivar [5]sdss_cmodelflux [5]sdss_cmodelflux_ivar [5]sdss_modelflux [5]sdss_modelflux_ivar [5]sdss_devflux [5]sdss_devflux_ivar [5]sdss_expflux [5]sdss_expflux_ivar [5]sdss_extinction [5]sdss_calib_status [5]sdss_resolve_status
int32string64int32boolint32string32float64float32float64float32float32float32float32float32boolfloat32float32float32float32float32float32uint8float32float32float32float32boolint16int16float32float32float32int16float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int16uint8int16int16int64int16int16int32int32int32int32int32float64float64float64float64float64float32int32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int32int32
3303423536m0020False0PSF353.7539779875.49316e+09-0.3804042296875.91708e+0927.31497.6698228.08.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.872142 .. 0.9642210 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993719 .. 0.9996880 .. 00.0 .. 0.00.0 .. 0.0139.533 .. 131.5020.00.00.00.00.00.00.00.00.00.00.00.00.00.00.037179500000000000 .. 00 .. 00.0 .. 0.0353.7539281230.0-0.3803802008390.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0021False1PSF353.7479540631.45843e+12-0.3795438119661.57489e+12110.08519.4937109.9819.1294False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.871674 .. 0.9640830 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993694 .. 0.9996870 .. 00.0 .. 0.00.0 .. 0.045476.9 .. 45473.30.00.00.00.00.00.00.00.00.00.00.00.00.00.00.037325442633742451237663783657799925244062685670568208402685968 .. 40268648064 .. 644576013943.96 .. 4576014015.67353.74796169749485296656.8-0.37957031894857501621525.71.06969 .. 0.872073529630.101704 .. 0.07858220.0962446 .. 0.5329910.148855 .. 0.33886362.3977 .. 246.1870.153044 .. 0.1380430.231894 .. 0.3411730.165774 .. 0.12152839.2922 .. 124.6381.0 .. 0.0-132.011 .. -74.9163-131.651 .. -75.52893.92214 .. 4.9982314.9687 .. 1.972893.90849 .. 5.1585215.1657 .. 1.400413.83192 .. 5.0613417.1756 .. 1.756233.90849 .. 5.1294215.1657 .. 1.416453.90186 .. 5.1585215.2224 .. 1.400410.158221 .. 0.047141724577 .. 24577257
3303423536m0022False1EXP353.7489076112.02215e+11-0.3805191054692.07723e+1196.98316.0923896.76855.79491False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.871755 .. 0.9641070 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993699 .. 0.9996870 .. 00.0 .. 0.00.0 .. 0.010135.2 .. 11153.50.00.00.45138116634.00.009197372222.770.04836014833.90.00.00.00.00.00.00.0373426337424612376637836577999262440326843572882088388881 .. 402685968538968064 .. 5373952644576013944.19 .. 4576014015.88353.7489232312409484139.24-0.3805407541374935325148.051.06969 .. 0.872073529630.0787096 .. 0.89950710.6936 .. 1.297260.05 .. 0.050.0 .. 0.00.176107 .. 0.75706719.0409 .. 0.6273640.149335 .. 0.050.0183832 .. 0.01.0 .. 0.960017-7.37162 .. -31.2828-3.02857 .. -32.08770.128687 .. 3.8078818.4152 .. 2.000470.117321 .. 6.76461.4914 .. 0.2618620.123604 .. 5.5505121.7456 .. 1.019330.117321 .. 6.792521.4914 .. 0.2598760.119604 .. 6.094011.4362 .. 0.3207070.158113 .. 0.047109424577 .. 24577257
3303423536m0023False2EXP353.7325442234.19103e+10-0.3794426511912.31583e+10321.8220.8865321.66321.5941False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.870474 .. 0.9637290 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993631 .. 0.9996840 .. 00.0 .. 0.00.0 .. 0.03269.02 .. 6828.790.00.01.803863446.90.20025113923.0-0.03147027849.210.00.00.00.00.00.00.037699942633743751237663783657800055-103-187891686465590142606593 .. 1342517774194304 .. 04576013940.28 .. 4576014011.98353.732555673488893833.644-0.37939114997665079563.36781.06582 .. 0.8718535296329.665 .. 3.0269772.9027 .. 4.991320.688987 .. 0.209741.66477 .. 0.4993847.25169 .. 1.4898220.8236 .. 1.156240.300129 .. 0.2753890.829887 .. 0.5628250.0 .. 0.696135-32.4272 .. -108.242-36.7273 .. -101.3530.0228772 .. 2.4048539.8436 .. 2.129422.98444 .. 8.652170.600877 .. 0.1462210.49134 .. 6.367127.15438 .. 0.3021510.4645 .. 9.493760.0440751 .. 0.1240842.98444 .. 6.724170.600877 .. 0.2472930.159804 .. 0.047613224577 .. 24577257
3303423536m0024False2PSF353.7311530751.57667e+11-0.3792080368091.71142e+11340.93524.1104341.024.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.870401 .. 0.9637080 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993628 .. 0.9996840 .. 00.0 .. 0.00.0 .. 0.05066.64 .. 5059.630.00.00.00.00.00.00.00.00.00.00.00.00.00.00.037722600000000000 .. 00 .. 00.0 .. 0.0353.7311483220.0-0.3792160746030.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0025False2PSF353.7325018918.84962e+08-0.3775102148219.74083e+08322.40147.4392322.048.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.870546 .. 0.963750 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993635 .. 0.9996840 .. 00.0 .. 0.00.0 .. 0.034.9649 .. 23.84640.00.00.00.00.00.00.00.00.00.00.00.00.00.00.037677200000000000 .. 00 .. 00.0 .. 0.0353.7325311080.0-0.3774694027110.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0026False3PSF353.719938861.70095e+09-0.3804491961591.8899e+09495.0217.05802495.07.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.869661 .. 0.9634890 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993589 .. 0.9996820 .. 00.0 .. 0.00.0 .. 0.051.0402 .. 44.01120.00.00.00.00.00.00.00.00.00.00.00.00.00.00.037953800000000000 .. 00 .. 00.0 .. 0.0353.7199403710.0-0.3804534189450.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0027False4PSF353.7027794125.48261e+09-0.3805563654525.90567e+09730.7955.58782731.06.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.868807 .. 0.9632370 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993544 .. 0.999680 .. 00.0 .. 0.00.0 .. 0.0140.406 .. 132.7430.00.00.00.00.00.00.00.00.00.00.00.00.00.00.038220700000000000 .. 00 .. 00.0 .. 0.0353.7027645210.0-0.3805263681620.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0028False5PSF353.6909817031.60198e+09-0.3804351932921.72703e+09892.8987.25414894.07.0False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.868422 .. 0.9631240 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993523 .. 0.9996790 .. 00.0 .. 0.00.0 .. 0.041.5259 .. 30.07420.00.00.00.00.00.00.00.00.00.00.00.00.00.00.038341200000000000 .. 00 .. 00.0 .. 0.0353.6909015310.0-0.3804536895850.00.0 .. 0.000.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00 .. 00
3303423536m0029False6DEV353.685906794.38563e+11-0.3792697128514.921e+11962.62923.269962.51523.1525False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.868389 .. 0.9631140 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.0 .. 0.00.0 .. 0.00.993522 .. 0.9996790 .. 00.0 .. 0.00.0 .. 0.017732.6 .. 18804.31.01.00.00.00.00.00.00.00.38713918981.8-0.06706734236.43-0.03165212433.450.038351542633731095123766378365773523910940326856687257368142606617 .. 2684682480 .. 5243524576013929.11 .. 4576014000.81353.6859150483949504164.42-0.3792781922223561512022.991.03919 .. 0.868149529631.22151 .. 2.848464.76633 .. 2.632560.179068 .. 0.2051191.54591 .. 0.2500560.912419 .. 1.595452.51472 .. 0.8082330.05 .. 0.2033130.0 .. 0.184541.0 .. 1.0-179.98 .. -72.4171-139.818 .. -74.62070.374483 .. 5.6790936.0262 .. 1.971050.529376 .. 19.782411.4568 .. 0.09151490.418912 .. 9.9548515.9037 .. 0.7354230.529376 .. 19.782411.4568 .. 0.09151490.429992 .. 14.158317.2007 .. 0.2098550.162573 .. 0.048438124577 .. 24577257
..........................................................................................................................................................................................................................................................................................
3303423536m0026166True3905DEV353.6682709266.19079e+07-0.3736250478015.17031e+071204.95100.8311204.51102.47False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.869351 .. 0.9633980 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-18.0248 .. -6123.780.00758986 .. 6.36196e-070.993572 .. 0.99968124 .. 120.00266311 .. 0.0004709430.352986 .. 0.019128327.4106 .. -4.392871.01.00.00.00.00.00.00.036.57190.09816470.0431265131.497-0.003780334.414260.0380506426337312251237663783657735369-10626856678469632142606593 .. 1342190092097152 .. 20971524576013924.9 .. 4576013996.6353.6683029551633897722.93-0.3735057981181456607923.321.03913 .. 0.8666015296312.3396 .. 0.0333333104.758 .. 10.30990.05 .. 0.1610770.0 .. 0.03527175.29325 .. 0.033333319.9507 .. 34.70050.05 .. 0.144990.0 .. 21.0934-0.0 .. 1.0-170.909 .. -53.0164-169.337 .. -52.80860.0373132 .. -0.3485639.468 .. 2.245580.472696 .. -0.3025293.30532 .. 1.22108-0.00415701 .. -0.30410437.3404 .. 2.051610.66923 .. -0.3025291.20673 .. 1.221080.472696 .. -0.3030553.30532 .. 1.219360.161293 .. 0.048056824577 .. 24577257
3303423536m0026167True3906PSF353.6988598231.36587e+09-0.2472313318571.07851e+09784.6411837.54781.9951834.89False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.877138 .. 0.9656890 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-3.2916 .. -420.8980.567748 .. 1.90057e-050.99398 .. 0.99970121 .. 110.00705063 .. 0.005003620.517031 .. 0.13450535.1631 .. -5.347590.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0356272426337312861237663783657735430-103268570880102400134348801 .. 40278835232768 .. 10855044576013932.25 .. 4576014003.95353.6990524051337577583.42-0.247424032044993412325.0651.05019 .. 0.84912529632.4232 .. 1.739195.25635 .. 1.545110.05 .. 0.050.0 .. 0.01.99007 .. 1.229681.90784 .. 0.6032470.05 .. 0.050.0 .. 0.01.0 .. 1.0-150.888 .. -28.6434-150.916 .. -27.55830.566814 .. 4.6768527.7688 .. 0.1578941.12699 .. 10.88237.14822 .. 0.2715040.784664 .. 10.87319.78997 .. 0.4631721.12699 .. 10.88237.14822 .. 0.2715040.949143 .. 9.115489.15837 .. 0.4051980.151027 .. 0.044998124577 .. 24577257
3303423536m0026168True3907PSF353.7065013718.63179e+08-0.2362174390021.02471e+09679.6431988.88682.4231992.16False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.877245 .. 0.965720 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 00.399996 .. -157.2650.583016 .. 1.90696e-050.993986 .. 0.99970224 .. 130.337281 .. 0.01758271.62017 .. 0.11449429.3152 .. -49.99080.00.00.00.00.00.00.00.00.00.00.00.00.00.00.035594426337313001237663783657735444-10353700224065552142639361 .. 1342504972097152 .. 41943044576013934.01 .. 4576014005.71353.706299013342529905.462-0.23597826392310852370.3641.05211 .. 0.851671529630.0333333 .. 0.1219070.53478 .. 3.880220.561076 .. 0.1811910.000855512 .. 0.02908450.0333333 .. 0.2445670.530326 .. 1.820090.822064 .. 0.1140470.00016083 .. 0.00505354-0.0 .. 1.0-129.759 .. -41.9316-129.802 .. -43.9124-0.235464 .. 0.50835943.2715 .. 2.23397-0.307081 .. 0.53249441.3646 .. 1.77915-0.390943 .. -26.45210.221776 .. 0.00939585-0.307083 .. 0.53249441.363 .. 1.77915-0.307081 .. 0.55778841.3646 .. 1.681750.150876 .. 0.044953224577 .. 24577257
3303423536m0026169True3908EXP353.5579119161.08324e+08-0.2256207886521.46008e+082721.312134.482721.752133.56False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.871079 .. 0.9639070 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-4.8861 .. -273.3250.441038 .. 1.72998e-050.993663 .. 0.99968625 .. 130.36154 .. 0.01349653.84635 .. 0.1376914.9617 .. 26.93020.00.01.6989324.6203-0.075138240.8121-0.051200134.70220.00.00.00.00.00.00.037511426337213211237663783657669929-103268566784102400134251777 .. 1427048972097152 .. 20971524576013898.47 .. 4576013970.16353.5578803781421665680.16-0.225687884046861367768.1761.06798 .. 0.882385296329.6353 .. 0.03333330.000587208 .. 3.910170.0604445 .. 0.06385150.782334 .. 0.05042827.7489 .. 0.033333372.3754 .. 0.00.0999876 .. 0.2610250.564504 .. 0.0-0.0 .. 0.0-0.0309311 .. -71.3778-18.9878 .. -71.3705-0.0401355 .. -0.78896641.6898 .. 2.138332.65988 .. -0.8353280.130844 .. 1.93056-1.03941 .. -2.136130.349777 .. 0.01393690.266946 .. -0.83540.326933 .. 1.930362.65988 .. -0.8353280.130844 .. 1.930560.15901 .. 0.047376724577 .. 24577257
3303423536m0026170True3909EXP353.5621749883.94739e+08-0.1557282697486.63994e+082662.743094.842664.473094.54False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.871441 .. 0.9640140 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-3.62625 .. -345.7910.478181 .. 1.82763e-050.993682 .. 0.99968725 .. 130.752757 .. 0.009718249.4781 .. 0.11687542.1971 .. 50.42890.00.01.230158.702-0.13485885.1952-0.139918176.8010.00.00.00.00.00.00.037398272833703012376571909023990062403302387472122896142741777 .. 1763289772097152 .. 26214404512774090.98 .. 4512774162.64353.5620493132424649858.93-0.1557497038013564583608.621.13601 .. 0.86444522310.0395962 .. 4.49173.78628e-07 .. 0.247480.05 .. 0.16552650.3876 .. 40.10360.0395962 .. 3.431629.33812e-08 .. 63.36660.05 .. 0.15190150.3876 .. 12.81611.0 .. 1.0-76.1364 .. -32.5905-76.5422 .. -30.43454.00172e-05 .. 0.00052406511.0302 .. 0.892287-5.95603e-05 .. 0.3010120.179047 .. 0.0101305-7.00668e-05 .. 0.00058997720.5488 .. 1.34138-5.95603e-05 .. 0.3010120.179047 .. 0.0101305-6.0598e-05 .. 0.4849310.179069 .. 0.0126040.158532 .. 0.047234324577 .. 24577257
3303423536m0026171True3910DEV353.6466618941.08174e+08-0.1401858559231.16049e+081501.863308.41503.43312.17False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.874335 .. 0.9648660 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0218.92 .. 3775.540.0451734 .. 4.00481e-060.993834 .. 0.99969424 .. 130.0260963 .. 0.00190016952.982 .. 0.071490824.7986 .. -9.01.01.00.00.00.00.00.00.013.22590.240372-0.0061387468.6164-0.028733743.59630.036496827283370981237657190902399074830630396034073744143003921 .. 344760532097152 .. 20971524512774111.21 .. 4512774182.87353.6465495751266639561.55-0.1399116955492166231938.231.12749 .. 0.862556522310.0333333 .. 0.76575145.2176 .. 10.33690.05 .. 0.050.0 .. 0.00.0333333 .. 0.71476617.4725 .. 7.329870.0641809 .. 0.050.854825 .. 0.0-0.0 .. 0.0-74.2041 .. -33.3253-74.25 .. -32.9906-0.176236 .. 1.2154226.555 .. 1.83329-0.167405 .. 1.874831.23515 .. 0.0612101-0.167486 .. 1.3110423.6258 .. 1.44894-0.167404 .. 1.999921.24127 .. 0.0550992-0.167405 .. 1.874831.23515 .. 0.06121010.154721 .. 0.046098924577 .. 24577257
3303423536m0026172True3911PSF353.653022792.92502e+09-0.1453560006863.12725e+091414.453237.361415.833239.17False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.874966 .. 0.9650510 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-22.0193 .. -462.8430.546266 .. 1.9779e-050.993867 .. 0.99969623 .. 130.43376 .. 0.008995041040.83 .. 0.12535193.3257 .. 51.47080.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0363012728337010512376571909023990818303303960340106512168170769 .. 1435282134194304 .. 20974084512774112.73 .. 4512774184.39353.652922672424610222.811-0.145223977718421685691.841.12749 .. 0.862556522310.748065 .. 0.0333333139.345 .. 5.899270.756769 .. 0.34421166.74 .. 0.0087236110.4019 .. 0.03333330.0 .. 12.69160.05 .. 0.186220.0 .. 0.14684-0.0 .. -0.0-109.947 .. -134.697-117.858 .. -134.666-0.0119922 .. -0.80892326.4037 .. 1.527660.541067 .. -0.7715260.148361 .. 0.165657-0.0380495 .. -1.1362511.3703 .. 0.674249-0.0280343 .. -0.7714881.91971 .. 0.1656690.541067 .. -0.7715260.148361 .. 0.1656570.153895 .. 0.045852824577 .. 24577257
3303423536m0026173True3912PSF353.7499481619.91284e+08-0.2359590603241.157e+0982.66681992.4285.55091992.58False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.875726 .. 0.9652740 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 04.24312 .. 544.7650.327213 .. 1.00223e-050.993907 .. 0.99969823 .. 130.111883 .. 0.005049480.475529 .. 0.034205229.0095 .. -8.765130.00.00.00.00.00.00.00.00.00.00.00.00.00.00.036065142633749001237663783657800580-103268567296102400134251777 .. 1342190092097152 .. 20971524576013944.38 .. 4576014016.08353.749738262510323053.33-0.2359477814421539175871.131.08491 .. 0.850646529635.45942 .. 29.675814.3745 .. 4.15920.05 .. 0.050.0 .. 0.03.57928 .. 19.76984.19384 .. 55.56580.05 .. 0.050.0 .. 0.01.0 .. 0.0-33.5235 .. -101.278-34.3704 .. -100.4220.319872 .. 0.85699734.9619 .. 2.252391.11589 .. 18.67923.16681 .. 0.009361580.262708 .. 0.9063124.9806 .. 1.386691.11589 .. 13.61413.16681 .. 0.01278810.951191 .. 18.67924.65574 .. 0.009361580.152856 .. 0.045543224577 .. 24577257
3303423536m0026174True3913DEV353.6665496231.87081e+08-0.1435585348224.9205e+081228.593262.061228.523262.08False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.876331 .. 0.9654520 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-159.147 .. -1225.880.227174 .. 1.37933e-050.993938 .. 0.99969925 .. 130.059431 .. 0.00807207927.48 .. 0.18493149.4136 .. 49.94641.01.00.00.00.00.00.00.04.2655134.0091-0.41896278.141-0.07193363.22470.035877227283371341237657190902464546903303960340106512176591121 .. 1771154132129920 .. 20971524512774115.99 .. 4512774187.65353.666554368873062286.368-0.1435569290341427250096.641.12657 .. 0.860598522314.90599 .. 23.800239.6083 .. 0.00.149988 .. 0.051.50309 .. 0.02.35283 .. 8.18777.27097 .. 0.007021770.299997 .. 0.051.91118 .. 0.01.0 .. 1.0-127.878 .. -1.77302-130.215 .. -2.803210.253652 .. 0.3801716.2564 .. 4.319081.06883 .. 7.778310.563472 .. 0.00551860.376285 .. 0.23837113.1519 .. 0.8147091.06883 .. 7.778310.563472 .. 0.00551860.828211 .. 4.499470.966129 .. 0.01970690.152083 .. 0.045312624577 .. 24577257
3303423536m0026175True3914EXP353.668122551.84225e+08-0.1402409358362.03254e+081206.983307.641206.293308.78False0.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.00.876491 .. 0.9654990 .. 00.0 .. 0.00.0 .. 0.00.0 .. 0.00.0 .. 0.0False0 .. 00 .. 0-17.5606 .. -791.1380.418623 .. 1.86376e-050.993947 .. 0.999724 .. 140.390156 .. 0.0118059411.81 .. 0.13268851.6948 .. 24.00810.00.01.65525342.179-0.0134878107.626-0.048031626.1450.00.00.00.00.00.00.03582752728337145123765719090246455790630396034073744143003921 .. 1771154132097152 .. 20971524512774116.4 .. 4512774188.06353.6681727661339040888.35-0.1401583167791177611352.191.12657 .. 0.860598522310.0369527 .. 7.939232988.82 .. 443.2460.05 .. 0.051876.15 .. 0.00.0333333 .. 0.48201223.0255 .. 88.02670.05 .. 0.0821871597.02 .. 0.8655211.0 .. 1.0-45.7588 .. -78.1961-46.5679 .. -0.0316559-0.0256408 .. 0.048539920.2104 .. 1.89018-0.0260681 .. 0.4343740.0247429 .. 0.00634437-0.0260991 .. 0.044830525.5064 .. 1.71573-0.0260681 .. 0.4343740.0247429 .. 0.00634437-0.0260622 .. 0.06400230.0247667 .. 0.08274890.151866 .. 0.045248224577 .. 24577257

In [228]:
decamcat = vstack(cattabs)
decamscs = SkyCoord(ra=decamcat['ra']*u.deg, dec=decamcat['dec']*u.deg, distance=anaK_coo.distance)

In [229]:
nearanakmsk = decamscs.separation_3d(anaK_coo) < 300*u.kpc
np.sum(nearanakmsk), len(nearanakmsk)


Out[229]:
(76519, 205094)

In [455]:
def mag_and_err(fluxidx, prefix):
    flux = decamcat[prefix + 'flux'][:, fluxidx]
    fluxivar = decamcat[prefix + 'flux_ivar'][:, fluxidx]
    
    mag = 22.5 - 2.5*np.log10(flux)
    merr = (2.5/np.log(10))* fluxivar**-0.5/flux
    
    return mag, merr

    
de_gmag, de_gerr = mag_and_err(1, prefix='decam_')
sdss_gmag, sdss_gerr = mag_and_err(1, prefix='sdss_cmodel')
de_rmag, de_rerr = mag_and_err(2, prefix='decam_')
sdss_rmag, sdss_rerr = mag_and_err(2, prefix='sdss_cmodel')
de_zmag, de_zerr = mag_and_err(4, prefix='decam_')
sdss_zmag, sdss_zerr = mag_and_err(4, prefix='sdss_cmodel')

de_rads = np.select([decamcat['type']=='PSF ', decamcat['type']=='EXP ', decamcat['type']=='DEV ', decamcat['type']=='COMP'],
                    [0.9, decamcat['shapeExp_r'], decamcat['shapeDev_r'], (decamcat['shapeExp_r'] + decamcat['shapeDev_r'])/2])

In [231]:
plt.scatter(de_zmag, sdss_zmag-de_zmag,color='k',alpha=.1,s=3)
plt.scatter(de_gmag, sdss_gmag-de_gmag,color='g',alpha=.1,s=3)
plt.scatter(de_rmag, sdss_rmag-de_rmag,color='r',alpha=.1,s=3)
plt.xlim(10,26)
plt.ylim(-3,3)
plt.axhline(0, color='b', ls='--')
plt.ylabel('sdss-DECALS r')
plt.xlabel('DECALS r')


Out[231]:
<matplotlib.text.Text at 0x1615f8490>

In [ ]:


In [232]:
plt.subplot(2,1,1)
plt.scatter(de_zmag, sdss_zerr,color='k',alpha=.1,s=3, label='z')
plt.scatter(de_gmag, sdss_gerr,color='g',alpha=.1,s=3, label='g')
plt.scatter(de_rmag, sdss_rerr,color='r',alpha=.1,s=3, label='r')
[h.set_alpha(1) for h in plt.legend(loc='upper left').legendHandles]
plt.xlim(10,26)
plt.ylim(0,1)
plt.ylabel('SDSS err')

plt.subplot(2,1,2)
plt.scatter(de_zmag, de_zerr,color='k',alpha=.1,s=3)
plt.scatter(de_gmag, de_gerr,color='g',alpha=.1,s=3)
plt.scatter(de_rmag, de_rerr,color='r',alpha=.1,s=3)
plt.xlim(10,26)
plt.ylim(0,1)
plt.ylabel('DECALS err')
plt.xlabel('DECALS r')
plt.tight_layout()



In [233]:
plt.subplot(1,3,1)
plt.scatter(de_gmag, sdss_gerr,color='b',alpha=.1,s=3,label='sdss')
plt.scatter(de_gmag, de_gerr,color='r',alpha=.1,s=3,label='DECALS')
[h.set_alpha(1) for h in plt.legend(loc='upper left').legendHandles]
plt.xlim(18,22)
plt.ylim(0,1)
plt.xlabel('DECALS g')
plt.ylabel('err')

plt.subplot(1,3,2)
plt.scatter(de_rmag, sdss_rerr,color='b',alpha=.1,s=3,label='sdss')
plt.scatter(de_rmag, de_rerr,color='r',alpha=.1,s=3,label='DECALS')
plt.xlim(18,22)
plt.ylim(0,1)
plt.xlabel('DECALS r')
plt.ylabel('err')

plt.subplot(1,3,3)
plt.scatter(de_zmag, sdss_zerr,color='b',alpha=.1,s=3,label='sdss')
plt.scatter(de_zmag, de_zerr,color='r',alpha=.1,s=3,label='DECALS')
plt.xlim(18,22)
plt.ylim(0,1)
plt.xlabel('DECALS z')
plt.ylabel('err')


Out[233]:
<matplotlib.text.Text at 0x15ffbecd0>

Try x-matching with sdss catalog


In [234]:
sdsscat = Table.read('catalogs/AnaK_sdss.dat', format='csv')
sdssscs = SkyCoord(sdsscat['ra']*u.deg, sdsscat['dec']*u.deg, distance=anaK_coo.distance)

In [245]:
sdss30am_msk = sdssscs.separation(anaK_coo) <= 30*u.arcmin
decam30am_msk = decamscs.separation(anaK_coo) <= 30*u.arcmin

In [473]:
plt.scatter(decamscs.ra[decam30am_msk], decamscs.dec[decam30am_msk], alpha=.1, facecolor='r',edgecolor='none')
plt.scatter(decamscs.ra[~decam30am_msk], decamscs.dec[~decam30am_msk], alpha=.1, facecolor='k',edgecolor='none')
plt.scatter(sdssscs.ra[sdss30am_msk], sdssscs.dec[sdss30am_msk], alpha=.1, facecolor='g',edgecolor='none')
plt.scatter(sdssscs.ra[~sdss30am_msk], sdssscs.dec[~sdss30am_msk], alpha=.1, facecolor='b',edgecolor='none')
for brickentry in allbricktab[anakin]:
    plt.text(brickentry['ra'], brickentry['dec'], brickentry['brickname'], ha='center', va='center', color=[0.7]*3)



In [458]:
sdssscs30am = sdssscs[sdss30am_msk]
sdsscat30am = sdsscat[sdss30am_msk]
decamscs30am = decamscs[decam30am_msk]
decamcat30am = decamcat[decam30am_msk]
de_rmag30am = de_rmag[decam30am_msk]
de_rads30am = de_rads[decam30am_msk]

Things in SDSS but not DECam


In [487]:
idx, d2d, d3d = sdssscs30am[sdsscat30am['r']<21].match_to_catalog_sky(decamscs30am[de_rmag30am < 22])
plt.hist(d2d.arcsec,bins=100,histtype='step',range=(0,10))
plt.xlabel('Distance from SDSS object w/ r<21 to nearest DECam match [arcsec]')
np.sum(d2d.arcsec>1), np.sum(d2d.arcsec>1)/len(d2d)


Out[487]:
(198, 0.038312693498452011)

In [260]:
targeting.sampled_imagelist(sdssscs30am[sdsscat30am['r']<21][d2d.arcsec>1], None, names=sdsscat30am[sdsscat30am['r']<21]['r'][d2d.arcsec>1]);

Things in DECam but not SDSS


In [586]:
idx, d2d, d3d = decamscs30am[de_rmag30am < 21].match_to_catalog_sky(sdssscs30am)
plt.hist(d2d.arcsec,bins=100,histtype='step',range=(0,10))
plt.xlabel('Distance from DECam object w/ r<21 to nearest SDSS match [arcsec]')
np.sum(d2d.arcsec>1), np.sum(d2d.arcsec>1)/len(d2d), np.sum((d2d.arcsec>1)&(decamcat30am['type'][de_rmag30am < 21]!='PSF '))


Out[586]:
(979, 0.12973760932944606, 900)

In [587]:
print(targeting.sampled_imagelist(decamscs30am[de_rmag30am < 21][d2d.arcsec>1], None, None, names=de_rmag30am[de_rmag30am < 21][d2d.arcsec>1]))


name ra dec
18.5152511597 354.322000607 0.431552944592
20.1081180573 354.124970641 0.297361594091
12.7188053131 353.682417451 0.129479177713
20.7806930542 353.890645392 0.29711965551
19.4181632996 353.805448747 0.455291124941
19.9361457825 354.093097703 0.0973910487892
20.7085266113 354.007418392 0.694713830253
18.4754772186 354.031040347 0.573657642581
19.5986251831 354.214921989 0.141747553362
20.915348053 353.994007252 -0.0557608304885
18.9383964539 353.651375964 0.209048429835
20.6650695801 354.284169755 0.301098094368
20.7740421295 353.916159034 -0.00939111347319
19.5377426147 354.421447062 0.0089001253634
16.3472900391 354.368610177 0.448842886183
20.4153385162 354.384201507 0.548951457382
17.5877246857 353.916288938 0.607937637351
20.6840381622 354.440926705 0.236630966919
18.5830974579 354.025614009 0.347199681852
20.2303657532 354.498050466 0.43448978968
19.8352413177 354.126577048 0.205992612181
19.8332672119 354.606438435 0.176376970156
19.3773403168 354.497624616 -0.0313795117013
20.2580909729 354.395933951 -0.09076495008
20.1380310059 353.773946944 0.200939681325
19.6735935211 354.110169909 -0.0998552772613
19.1017494202 354.123389936 0.303392889043
19.5534992218 354.044836056 0.756738296206
19.8063163757 353.774602521 0.186480450086
20.2008056641 354.121567505 0.205664642849
19.0695800781 353.940066686 -0.000793478126229
20.7077999115 354.356961825 0.382010558279
19.3538360596 354.613855337 0.20277522004
20.3279380798 354.362599067 0.392743863381
15.3932008743 353.820524374 0.183226736667
19.9235057831 353.969516703 0.35812017942
20.3151073456 353.808310352 0.0401921061845
20.3741035461 354.419564153 0.275868018408
20.711933136 353.805335008 0.0290131197052
19.5956096649 354.349584254 0.0933105052683
19.0418071747 354.422098828 0.00913829969937
17.2031154633 354.096621839 0.612111268695
16.8474845886 353.68293172 0.129327828529
15.7020921707 354.19557544 0.623354153839
19.7043228149 354.419539403 0.392786193952
19.6396884918 354.135527593 0.274601361793
20.7963447571 354.1880254 0.37601994752
15.9995231628 353.85912292 0.635441039085
20.64103508 354.121938969 0.271286834338
20.4325218201 353.95211537 -0.103748346578
20.9217987061 353.959026712 0.44810218852
18.9352588654 354.124278235 -0.189298596235
20.2393188477 354.215834757 0.365038684896
19.1980075836 354.363290928 0.000807190994867
20.3362960815 354.352282652 0.380703589496
20.1097373962 354.353328159 0.380630994708
17.853094101 353.888640714 -0.119347763836
19.9486637115 353.964156835 0.363418865853
20.8168945312 353.961361834 0.446750798528
20.392124176 354.497710959 -0.0313787150536
19.6639060974 353.807478952 -0.0608709623204
19.2741737366 354.345949704 0.592661652274
17.3551692963 354.010138023 0.683447305363
20.9615535736 354.411848507 0.71031820545
20.5631256104 354.348133632 0.380876661617
20.057849884 354.489422851 -0.0411317590569
19.94962883 354.223501389 0.652838703714
19.3046379089 354.133998336 0.275532399057
20.7111282349 354.210854761 -0.0394380769967
19.1700744629 354.13152349 -0.182662846503
19.9235095978 353.996647381 0.402202844363
20.2037220001 354.346550205 0.379642195269
20.8897399902 354.430251286 0.505369367861
19.6925544739 353.958019733 0.370724462266
17.7712955475 353.632259406 0.315295375291
14.0796575546 353.953887612 0.444486264939
19.9358406067 353.692540279 0.478694345123
19.9020729065 354.311528287 0.337499870971
18.5891132355 354.410640617 0.476026887304
20.6334037781 354.440043536 0.236608703199
15.6859550476 353.806817138 0.206968598721
20.0258903503 354.151688859 0.706946269127
18.1231918335 354.115481611 0.00152749209562
16.1823158264 354.614528104 0.202841007067
20.2755832672 353.779316675 0.622628464782
19.4795703888 354.249140169 -0.151348093105
20.5271282196 354.242230539 0.577374099095
16.271604538 353.781574443 0.191477526399
20.745262146 354.373515205 0.709436479634
18.614812851 354.195712771 -0.076079855599
20.9091339111 353.770178822 0.179531505107
20.9210968018 354.435520765 0.457403887569
20.1162528992 353.939671771 -0.119729850637
16.8195114136 354.131808766 -0.181171909792
20.7275943756 354.092331151 0.0982194652039
19.017408371 353.7805858 0.18274873473
20.8742961884 354.123255107 0.318114254484
20.7987613678 353.687907316 0.124587743375
14.9226427078 353.888296612 -0.116703063906
18.0138015747 353.940160526 -0.119864957247
16.7802619934 353.781492443 0.189934022006
19.5350799561 354.115389259 0.30419967505
20.0996379852 354.285213589 0.37006884917
18.6610584259 354.175267713 0.491935837716
20.0381298065 354.380392147 0.634299714987
20.1537132263 354.151511096 0.705829422998
20.4884815216 353.745252931 0.468878939196
20.7849998474 354.099790579 0.0662867808529
18.0855579376 354.418293197 0.611632875158
17.2746162415 353.833002682 0.0446496436697
18.0328788757 354.372070236 0.533880275868
20.5634307861 354.412930924 0.707687572634
20.7101554871 353.779327624 0.577755678753
19.1805534363 353.955774892 0.103566050589
18.0268859863 353.806164391 0.204669924947
19.9219989777 353.861672086 0.556734217844
20.9785804749 354.214262114 0.637366130669
20.4301261902 354.234868505 0.112023171451
20.670747757 354.203082087 0.499140107655
20.1633815765 353.885752231 -0.116500668472
20.9730644226 354.413614118 0.499094217803
20.8168201447 354.051348528 0.44407913103
20.7697124481 354.128909333 0.318150101209
17.9581604004 354.418451639 0.610075851499
20.2985420227 354.250914043 0.178385205497
18.2297458649 354.368894511 0.21855151792
19.5775718689 354.491991653 0.268560594676
20.5565643311 353.775474614 0.417272425852
20.5452709198 353.904593023 0.557408706541
19.8506145477 354.110442547 -0.0990866105602
20.4301700592 353.807425752 0.0362513236072
20.3233528137 354.331726328 0.392889070563
19.9676818848 354.378299753 0.430690668158
18.706817627 354.057288694 0.0601231754444
17.0419979095 353.803210918 0.333875954261
20.9872932434 354.335099687 -0.0346611116017
20.2192192078 353.956420084 0.103320697479
20.2282752991 353.921529396 0.316315327357
20.7212467194 353.954611322 0.438357727639
18.3114776611 354.07298436 -0.19630915671
20.3524971008 353.88535743 -0.119709114861
19.4857673645 353.892470563 0.735069610974
20.5841026306 353.860877169 0.639139219264
20.5339317322 353.892444147 -0.0585942614691
17.7411003113 354.335190117 0.396004628795
17.2483940125 353.76839388 0.101995892987
17.3078632355 354.132705612 0.263616097181
20.4881973267 354.381638508 0.439521012979
20.8487701416 353.955515992 0.102827309327
20.2124710083 353.837740693 0.315546432726
20.097990036 354.351989475 -0.131787032824
17.689414978 353.916343597 0.608532508357
18.1097621918 354.15739303 0.512591684813
19.6197338104 354.048425425 0.729012736285
19.9666481018 354.261528603 0.414115873998
19.7518291473 354.197196274 0.621814086994
20.2588443756 354.345956917 0.40946150503
17.5979652405 354.121539595 0.206553807751
20.2544670105 354.500144642 0.349794684094
19.0983657837 354.312008781 0.340979115018
19.0875644684 353.88871829 -0.119349101372
19.4444236755 353.84448185 0.371909164893
19.8304901123 354.367069338 0.562166667505
20.1520462036 354.587662912 0.277772791431
20.329492569 354.420187747 0.661383592994
19.8630084991 354.339652195 0.582828232036
18.6686477661 353.965908135 0.710742773578
18.1408958435 353.874713278 0.399695498751
19.1127662659 354.169749924 0.214126598769
19.3190364838 354.13732537 0.304359884157
16.3887081146 354.25136338 0.28785279512
16.9662723541 353.907596279 0.560377953054
20.6973056793 353.775674503 0.418291092227
17.8200759888 353.78106382 0.190072201726
17.0940513611 354.288884947 0.643883483028
19.5807304382 353.859868242 0.637723108862
20.7279052734 353.76803723 0.621502852935
18.2616386414 354.078990643 0.0450421127701
16.2025699615 353.821598698 0.333654802899
17.5016860962 354.43235112 0.358159779513
18.9555854797 354.251581795 0.287249175633
20.5796356201 354.243528655 -0.1229163835
19.9241847992 354.363146566 0.700574779774
20.6335411072 353.635019632 0.316072879663
16.6722068787 354.06259713 0.195511775508
20.3749294281 354.353963146 0.376404518211
20.1348018646 353.779144783 0.62137215772
20.2007484436 354.314942229 0.370489719144
17.0164337158 353.952551626 0.44353179327
17.1380805969 353.681823472 0.13078424019
20.6383018494 354.354963744 0.383004972174
17.9022903442 353.851668316 0.436425095555
16.8036231995 353.907628235 0.559314923381
18.5287284851 354.384796973 0.252960435393
20.5898571014 353.84941158 -0.0310295765828
18.1386528015 353.805223107 0.205577709821
19.9383964539 354.250615413 0.24800735247
17.8050460815 354.339052854 0.39707467822
19.5779781342 353.78741969 0.176610996894
20.9464035034 354.167162614 0.718580967611
17.995765686 354.367346798 0.564312937158
17.1491775513 354.180157146 0.0967738481924
18.8171577454 353.710797175 0.0382976718619
18.7156734467 354.373338618 0.53306645353
20.6790313721 353.687951673 0.130285310591
20.12550354 353.792513109 0.16737307019
19.3235740662 353.848869598 0.278121501565
16.273147583 354.176280392 0.210649348312
20.420003891 353.913881933 0.164788668103
20.3601875305 354.261514628 0.245309092353
19.2230472565 354.178030015 -0.181357136262
18.4406013489 354.273372542 0.148294978017
20.5077075958 354.228929238 0.399123479725
19.0490684509 354.327528709 -0.0665466539685
20.5721206665 353.987245165 0.382612237033
19.5258541107 353.888772937 0.298411649992
19.9645824432 353.89490329 0.290115750339
20.0576591492 354.257796467 0.280858189341
20.9461574554 353.651512974 0.207870950138
20.6191539764 354.365421589 0.563896179052
20.4534168243 353.996790106 0.689475567935
18.6944255829 354.317805726 -0.0610080187206
20.9990348816 354.021404068 0.530816339853
20.1202201843 354.4184538 0.390092151528
20.9816036224 354.504673304 0.407773273265
18.5708637238 354.250329851 -0.1510929205
19.7409229279 354.133784007 0.518211132129
20.0140304565 354.153948913 0.325153624387
19.2837600708 354.110469633 -0.0997385093647
18.6287117004 354.500072741 0.34880334502
20.2642688751 353.948409747 0.0449499563046
16.6216278076 354.005599475 0.687358044692
17.4704856873 353.807320375 0.207491917394
20.0700645447 354.598564202 0.367628267747
18.8174495697 354.123208766 0.311518934201
20.7561569214 354.587783374 0.276938060391
19.6966514587 353.84914438 0.279363076001
20.2320404053 353.7720387 0.197245018206
20.7913684845 354.499235368 0.349188161603
20.2116146088 353.80732835 0.399336517437
19.8622779846 354.435929115 0.516424266396
19.4312229156 354.295706015 0.265598467817
20.5857658386 353.895840011 0.525312229041
18.8526306152 354.131340864 0.292985005659
20.5294589996 354.2028066 0.498146178607
20.6740093231 354.172218347 -0.068371855765
20.7700614929 354.152907465 0.711241920908
20.4430885315 353.812841591 0.0421891501455
18.6157398224 354.126461634 0.75272373879
20.6430225372 354.133607693 0.14111628197
20.9398708344 353.937051229 0.0138114992285
20.8376178741 354.143630214 0.273849322908
20.3085746765 354.260017106 0.548948681272
19.7357654572 353.911493088 0.197298542553
18.7009925842 354.055293399 0.0473352919575
20.5768547058 354.136350394 0.275080614551
20.6278018951 354.497984439 0.433371923473
18.2397651672 354.250279939 -0.151045747422
15.2919692993 353.951324754 0.685521588792
19.6860313416 354.212049348 0.0372602902148
18.2555713654 354.051747766 -0.0103073049771
18.6712188721 354.122607143 0.294760981089
17.7416477203 353.796216845 0.005679170047
20.899930954 354.257365965 0.641886309574
18.5902404785 353.77094411 0.200895730116
20.8399848938 354.369306809 0.563802017293
17.8835010529 354.138424434 0.303276786444
20.9475631714 353.908431404 0.55381031476
18.9932880402 354.359793947 0.375177100002
20.4548950195 354.15063431 0.650108829889
20.3793525696 354.254500248 -0.155206725138
20.6902332306 353.725419269 0.361114255999
20.5308132172 354.31462401 0.369449217416
13.1742744446 354.13144063 0.298409045775
18.5044307709 353.700195954 0.536278735499
18.3639373779 353.894761383 0.73786264386
19.929561615 354.128224462 0.301930335389
19.9431972504 353.831798369 0.31194566484
18.8783493042 354.250382289 -0.149830800515
20.9370002747 353.938299619 0.399999850096
20.109539032 354.314887149 0.370495748843
16.5115394592 353.79905694 0.199680798533
18.3522567749 354.12679861 0.752754618189
18.4464817047 354.14308673 0.268492452696
18.3965053558 353.88767559 -0.118290941539
20.124162674 354.367506545 0.380615466113
20.7632598877 354.124552726 0.320717460359
18.5766487122 354.368167368 0.384032822836
16.17786026 354.005847012 0.523375156259
18.9506378174 353.953052697 0.187383137344
20.9190654755 354.389883078 0.567668338964
18.9672851562 354.111897278 0.287628605609
12.8273429871 354.005390365 0.688229007016
20.5774841309 354.116882885 0.311154159291
20.1913604736 353.822280709 0.232289988371
17.5165367126 353.907218422 0.560146383052
20.012090683 353.996445506 0.401630288965
15.5236330032 354.051235582 -0.00945870596644
17.5828800201 354.138268928 0.267990637108
15.9178352356 353.888237148 -0.118575542948
20.0959186554 354.592106739 0.364111247163
19.2687797546 354.050121648 -0.00775308571671
19.1088085175 354.001531627 0.689031300004
17.7539215088 354.152322215 0.651332265883
18.7042446136 353.97421475 0.442837742443
20.0493888855 354.590266028 0.415439180033
16.0568351746 354.36023603 0.375199941643
20.8131580353 354.150307954 -0.0178677531012
17.4753398895 353.782530934 0.18205309502
18.4036445618 353.950658107 0.451432275846
11.6155157089 353.782205851 0.190891355647
18.8614845276 353.952078204 -0.134517040052
20.6382274628 353.829112733 -0.068124443721
17.7401580811 353.821122332 0.183480653655
20.1299686432 353.931752317 0.56473110108
19.5889205933 353.951446374 0.437648850086
20.052406311 353.950534361 -0.0363747437364
16.6276435852 354.005679018 0.68868841492
19.7687797546 353.826177127 0.340533068405
20.3825931549 354.346067302 0.593814757191
19.1787891388 353.782483317 0.214057413403
20.9930019379 354.209317029 0.668698085054
19.2164554596 354.387433027 0.550128815552
16.7229747772 354.138753045 0.522241656995
18.4585113525 354.19967371 0.29370845306
14.9015045166 354.288488189 0.644700791092
18.6589889526 354.411359083 0.709054282629
19.5198879242 353.82051307 0.333899965352
18.9130306244 353.702672921 0.0743613986602
19.579120636 353.913436692 0.164131223733
20.9502487183 353.779065074 0.621669263153
19.4412193298 353.687261301 0.130009045314
17.254119873 354.615112434 0.201813992051
20.4771556854 354.461449053 0.328177796029
17.1966362 353.79302558 0.0626224651136
20.2418231964 354.498051615 0.434490956464
19.1329917908 354.04180221 0.728511291761
13.4839448929 354.349702889 0.382000910199
20.1268844604 354.440033444 0.502303064006
20.0243225098 353.949703784 0.596305039786
20.2880096436 353.780699984 0.167527189227
18.730594635 353.942410044 0.71843278799
18.575170517 354.137432916 0.494428217062
20.6420612335 354.328505371 0.0366769146334
16.7547168732 353.794270007 0.0618348636853
20.9442157745 354.366136442 0.375678973912
20.6118335724 353.799886758 0.622880128921
20.718585968 353.741721476 0.583421925873
14.5035228729 354.006064826 0.688315296652
20.0110702515 353.773174539 0.201168653218
20.8511543274 354.132421189 0.389228331582
17.6967544556 353.940346131 -0.120082170173
18.6512928009 353.832611714 0.0457013725803
17.1599636078 353.782609963 0.192066264698
18.8129272461 353.832916963 0.045874961027
20.0273361206 353.843592454 0.310356571761
18.0695571899 354.199764846 0.295003336775
17.6039428711 354.175438894 -0.0673927737222
16.5073394775 353.781280936 0.19062515991
18.9414615631 354.368773452 0.447555630463
19.4941673279 354.157380974 0.511322642975
17.631690979 353.907223116 0.558879537508
20.6909294128 354.154582115 0.310514966607
19.8916301727 354.197421665 0.619633925588
15.8401660919 354.340492088 0.391603859871
19.6689453125 354.390661052 0.547245182116
19.7042160034 353.805830204 0.0476918895012
19.4201984406 353.758375848 0.010943093848
20.7549247742 354.430948658 0.122248598595
15.0725450516 354.127225238 0.293538293571
19.573682785 354.152463772 0.3064667814
16.3316631317 354.152288084 0.651998346351
19.1022663116 354.368751378 0.448249805529
18.335855484 354.139486529 0.295716618374
20.0862884521 353.811361997 0.2062014386
18.9715309143 353.957774451 0.370021842264
17.0988330841 353.954520805 0.44454804139
19.1395950317 354.185533244 -0.0386324539652
20.269865036 353.7670859 0.193881574849
18.4582099915 354.36616782 0.562566247987
20.1883010864 354.062040894 -0.189616529755
18.1995639801 354.362522237 0.001907927161
20.9912624359 354.18087942 0.0974642800968
19.9239463806 354.24377623 -0.122021077948
20.8359012604 354.127323688 0.27224978532
20.422826767 353.804701349 0.20050640563
16.5726566315 354.288858833 0.644653167812
18.4611282349 354.167971661 0.718346833605
20.0937747955 354.346799453 0.404589000071
19.1622486115 354.497693662 -0.0322321676367
13.8536930084 353.682951461 0.12993644049
19.3566493988 353.656274502 0.198461504793
19.5262489319 353.965862397 0.334603855409
18.9290237427 353.83778429 0.3168530678
20.7702026367 354.124475367 -0.188278853872
20.3780822754 354.139538724 0.255926602205
18.9572963715 354.205747818 -0.0132485396194
18.2475547791 353.779110581 0.189025385657
20.0901184082 354.306054123 0.407770192912
13.6687965393 354.358033786 0.398075332974
13.3401508331 353.9545388 0.444806618366
20.8035583496 353.885639141 0.300721822558
19.0484294891 354.003122285 0.683255018774
19.7391166687 353.839042239 0.31927629891
18.5715484619 353.851475809 0.286572416234
19.8334369659 354.446019812 0.470791091771
18.5911197662 354.421999688 0.179375067454
17.588136673 354.054814135 0.530874721161
16.0225772858 354.28218468 0.211029310098
13.6722822189 353.682801456 0.13051779866
17.0204772949 353.859163304 0.634781359569
20.3193740845 353.775712731 0.178819243976
17.8440647125 354.120564995 0.206221445968
20.1591262817 353.673016365 0.182892362637
20.546163559 353.851796874 0.287474012272
18.6228847504 353.807451158 0.206724748545
18.6426944733 353.861225792 0.555878593361
18.5861225128 354.07797696 0.0454381209927
16.6554756165 354.59575782 0.363252805267
20.1829147339 353.915671242 -0.0104360867105
19.9513092041 354.348214792 0.406714193924
20.9813861847 354.504673275 0.407773280407
15.6753940582 354.418078732 0.389298209893
19.9889659882 354.217121957 0.50839315642
17.8161716461 353.683561536 0.129009785233
20.5308647156 353.980598235 -0.0605434521275
20.100944519 354.233129841 0.269197085424
15.0975389481 353.793324159 0.0631224747513
19.9048099518 354.250611224 0.248001971274
17.720954895 353.687890435 0.131374358245
17.5200805664 353.8778104 -0.121625260754
19.9148921967 354.046796699 0.0191533294053
19.9657802582 353.844255404 0.314772713349
19.3662586212 353.916313498 -0.0102398683513
20.4612998962 354.001491444 0.689044846163
19.9738845825 354.470003784 0.16477711025
16.9828166962 353.957944478 -0.0127616307844
20.9739704132 353.962862608 0.436639188416
19.1992912292 354.421812485 0.657544255296
18.5034866333 354.372423676 0.53485625636
20.6424598694 353.679033106 0.108695444724
20.1572227478 353.660389038 0.2079379262
18.0691833496 353.893400962 0.736392132987
20.2462615967 354.41933457 0.391038621463
18.4401092529 354.057220106 0.57758396941
19.9687232971 354.057554856 0.578451065859
20.3505401611 353.700488147 0.536069538921
17.6716766357 354.126721302 0.751891180249
20.588350296 353.804641961 0.0383947463849
19.9412841797 353.894463576 0.290691354485
20.726978302 354.125246469 0.289146935525
20.1748847961 354.142365031 0.262010715511
20.3218727112 353.884906461 -0.0737862389987
18.055185318 353.888310832 -0.119425254283
20.7758178711 354.142155759 0.516639336293
20.6884174347 354.371173243 -0.0554135869183
19.8635959625 353.967540716 0.651793157541
20.3984661102 354.379842876 0.634361296352
19.6533184052 354.009699353 0.260289716924
19.9988956451 354.414382923 0.685743868406
16.4963226318 354.124725227 0.26824649718
18.3455104828 353.894371532 0.0879285597955
20.9307079315 354.415208279 0.194669895925
20.835723877 354.482003541 0.578314751247
20.6077899933 354.137154065 0.493464020934
19.9410629272 354.003107379 0.68320879713
16.5704612732 354.031972821 0.573352395445
17.6851406097 354.00566115 0.688359647944
20.4702739716 354.450873245 0.476239486506
18.5483779907 354.112338193 0.289807187667
20.6268692017 354.497984509 0.433372286919
18.7145595551 354.121249328 0.205410793746
19.8227462769 354.092149395 0.607948964979
17.9067630768 353.915705306 -0.00904667384913
19.6780052185 353.954873514 0.404141089036
20.5953464508 353.986975749 0.381654141766
18.5528945923 354.460323606 0.335334719729
19.8802680969 353.91382081 0.00787591799363
17.6725521088 353.83863269 0.315334216876
20.4672794342 354.249359829 0.211438236683
19.4420433044 354.14768918 0.29323036186
20.8368873596 353.767671938 0.175956410745
19.4688873291 353.956114531 0.102471530359
17.979391098 354.249852938 -0.151091490493
19.7823543549 354.497451378 0.433863593253
20.9466304779 354.048083177 0.0958118700565
18.8277320862 354.005661258 0.687271628589
19.0609664917 354.140615097 0.306868339918
17.3790397644 353.78627222 0.201846435511
19.2946224213 353.9673661 0.369161709479
19.3294219971 354.21190792 0.0360549656263
19.5176677704 353.793054153 0.0636847687089
20.0525054932 354.197879679 0.618739941576
19.6036281586 354.391095107 -0.059115757886
20.2051353455 354.341258528 0.386166964812
19.2512321472 354.431013738 0.122787486038
18.5197219849 354.352515852 0.402908796281
20.9335136414 354.250366045 0.247077016881
19.4913368225 353.683265666 0.129205380589
19.5812072754 354.180743034 0.0963553628049
19.5169143677 354.169527126 0.213505096017
14.9853286743 354.595170828 0.364388577449
19.075258255 354.413868079 0.686851806177
20.5342617035 354.34694075 0.391669087388
20.6431064606 353.793513438 0.203452230488
18.5725479126 354.392040943 0.543080294649
18.4339332581 353.950726477 -0.135775390984
19.9991912842 354.333861583 0.406182243861
20.9458293915 354.283148607 0.369372293641
18.26146698 353.697004529 0.167767455738
16.1072826385 353.803252523 0.334121577017
19.2651195526 354.00990486 0.261914378162
20.2565670013 353.808894704 0.202662371786
20.8243713379 354.123704044 -0.188527307605
20.2272758484 354.588030547 0.277834265897
16.055437088 353.849335171 -0.114461307212
13.3346204758 353.78105457 0.19161557812
18.0547370911 353.963537531 0.364083309077
15.9781951904 353.80146193 0.0352965042437
18.7423267365 353.904381533 -0.12856039558
19.5788421631 354.362379462 0.00121864523954
16.0667457581 354.181967101 -0.0654748617661
18.7960014343 353.648278445 0.217501188343
20.9667015076 354.19603667 0.61837670182
14.996006012 354.368630653 0.448027298062
18.1604690552 353.961865731 0.36291702315
19.9598178864 353.996445229 0.401633048178
19.7939243317 354.497450903 0.43386128248
20.9378395081 354.368898029 0.217497746451
20.7186203003 354.311507748 0.340729022771
14.662979126 354.371945395 0.534720994448
20.3960609436 354.006014692 0.522831620359
20.4886779785 353.745252974 0.468878896535
20.6627254486 353.822055803 0.23132177828
19.7588977814 354.492460044 0.268134730808
19.5025444031 353.681418735 0.130859263341
20.8502883911 353.807009449 0.398364574646
20.174451828 354.034110765 0.119968585846
15.4287490845 353.887858613 -0.118935153179
20.3213691711 354.349433298 0.378646947834
19.6143989563 354.139196318 0.279952651876
20.0114631653 353.888004053 0.29901921301
19.7498588562 354.437778661 0.484334917221
20.085313797 353.953142258 0.452066490776
18.6934280396 353.828404511 0.0260054937563
16.5247039795 353.963033687 0.36407339159
15.3847227097 353.807582375 0.0451779581912
20.1584606171 354.261880227 0.304466880824
19.8856468201 354.020379981 -0.0586222709552
17.2049770355 354.062615614 0.19524512144
20.9990825653 353.879646211 0.384464378084
18.1126174927 353.822325806 0.333924591065
19.9042930603 354.361144498 0.568350168355
20.6407375336 354.121794103 0.291221296728
19.3572731018 354.224767495 0.118819705853
19.3328227997 354.137644156 0.299829716038
20.210893631 354.125624302 0.282555591365
20.2127799988 354.398520547 0.212293469637
20.5407943726 354.111327135 0.294138246492
18.7529773712 354.327298757 -0.067567814039
19.2083969116 354.132202755 0.273054762385
19.2848091125 354.372617604 0.535061942055
20.7375469208 354.28023986 -0.00656150359605
20.8253421783 353.848056142 -0.0297435397023
20.7445011139 354.307296989 0.0181718018988
19.4079093933 354.12296489 0.301835082419
20.1529846191 353.779133434 0.621391125678
19.8447799683 354.124145746 0.301215443361
17.6774101257 354.249863042 -0.151070515864
19.0109863281 354.040062168 -0.121941846759
17.9016017914 353.935111734 -0.0707154235288
20.4053554535 354.079112864 -0.105335739759
20.9193134308 353.780115621 0.577781962066
18.8294391632 354.250905924 -0.157750464084
18.2303123474 353.88870769 -0.11837919276
18.5925178528 354.180509944 0.0972716867242
16.4931526184 353.965919221 0.334097497993
20.1173934937 354.367510491 0.380617020989
18.9619960785 354.283359097 0.37014237483
19.9336662292 353.792263787 0.179625132414
20.2200012207 353.838966641 0.314950234038
18.9870262146 353.953355403 0.443767195236
15.8613109589 353.951594606 0.686002381974
20.7579498291 354.245825798 -0.0641170423662
18.8569259644 354.131834524 0.263790837744
16.1424446106 353.877848316 -0.121703610303
17.696603775 354.409470892 0.478277693754
19.6983737946 354.508365315 0.469872557221
17.7014694214 354.141067589 0.263276911034
18.1805515289 354.349847305 0.376570471842
19.3856048584 354.250803654 -0.149404397686
17.0598316193 353.894561422 0.737627965346
17.4980564117 354.180232863 0.0972126388594
20.6323833466 354.25609775 0.332655981002
20.7178211212 354.576758419 0.427106758977
19.41847229 354.250797958 -0.149413115554
20.6135139465 353.843453804 0.325149716559
18.7036972046 353.795882231 0.190774540137
19.3752498627 354.016121048 0.083116887395
19.8555355072 354.373857573 0.535485109906
20.5730400085 353.774978337 0.199310489774
19.1594047546 353.980926591 -0.0605979496858
20.3672847748 354.272613573 0.14785835451
20.9418582916 354.11862277 0.208646904364
17.3835067749 354.144651224 0.268408568465
20.5293045044 354.346431831 0.379641289816
17.6834926605 353.771353098 -0.0417004246725
20.2560882568 354.414409603 0.309973416151
20.1466464996 354.517606587 0.124361974374
20.4392738342 353.894298384 0.289313468393
18.355922699 353.952631185 -0.104611512711
18.8253936768 354.366759762 0.563657370676
20.0942974091 354.126148369 0.300057099175
18.0010032654 354.151740862 0.706561689146
20.8544158936 354.424296839 0.271046149417
20.0875034332 354.210072245 0.668269138293
19.0148525238 354.413227472 0.191229734701
20.8985824585 354.409959686 0.546144665164
17.4368534088 353.852355882 0.436096811469
16.62317276 353.906438727 0.559580901608
15.553229332 354.595418757 0.364968798296
20.537279129 354.130551369 0.264920463877
19.2903270721 354.111250661 0.689950173084
20.4069194794 353.725605557 0.36208124086
17.6110897064 354.327423944 0.696240928891
20.1999530792 354.211713611 0.0378064396677
20.4273910522 354.285245401 0.370073711409
20.935459137 354.350042404 0.592853066036
18.2627067566 354.457956483 0.0422333829868
20.1174163818 353.779312693 0.62260418203
16.796787262 353.781427185 0.259735318023
20.5457134247 353.844653974 0.372025216995
20.3947029114 354.132589201 0.390249163644
20.5303440094 354.122138429 0.26022276259
20.858587265 354.415778962 0.241583508412
20.7719860077 354.424860525 0.473800540066
18.488615036 354.006120774 0.523277294419
19.0521736145 354.440905193 0.237163241315
19.6252689362 354.126191082 0.256317151865
18.4264125824 354.120739718 0.574186600561
18.2286815643 353.887717226 -0.11932084229
20.5040969849 354.145407112 0.284810452018
17.2165489197 353.682560755 0.129073342658
20.3743438721 354.378208877 0.429917817187
20.6542377472 354.28430039 0.634429759319
20.6804981232 354.431627144 0.455178307041
20.1195526123 353.807234482 -0.0619505228088
20.0866107941 353.795159954 0.174374951726
18.0157566071 354.00619954 0.687336994922
20.1856937408 353.965317494 0.36938271647
20.1259326935 354.11822289 0.314197052781
17.8160686493 354.127029706 0.313264600935
18.7696800232 354.588909754 0.413781547591
20.6555480957 353.767327004 0.186637386306
19.6659126282 354.138870522 0.282159459452
19.574010849 354.21719087 -0.0474677215488
17.4515628815 353.859449918 0.632862058036
20.7625751495 354.342666844 0.58413826095
18.9848060608 354.288695882 0.643671381612
18.4930114746 354.121100963 0.205707777766
20.6629390717 354.153833994 0.709414573969
19.9831905365 354.136484104 0.320142195341
20.9160995483 353.960567952 0.444876199807
19.1273956299 353.849438235 -0.112834629046
19.6390838623 354.548633392 0.0270274333772
20.7896766663 354.499237316 0.349187239692
18.4749259949 354.121862991 0.20543132642
20.8078079224 354.000057657 0.687024767821
20.9606761932 354.000971393 0.692713896105
20.3739147186 353.996790134 0.68947553359
20.795999527 354.327780111 0.0365304929148
18.8885421753 353.949564708 0.594792511913
20.4498538971 354.124152251 0.262592224572
19.4532585144 354.343169326 0.380129761529
20.6691551208 354.314017178 0.37000144855
17.615819931 354.418150658 0.38970975321
19.0128993988 353.862813496 0.634747545314
19.835231781 353.69542086 0.117035196442
19.0998821259 354.349482698 0.378699160404
18.7001152039 353.805069239 0.453990970957
20.6765823364 354.328478408 0.037591853871
19.9633312225 354.388929571 0.536779769914
18.6910514832 354.385914646 -0.0075921277156
19.838596344 354.32861722 -0.065477024778
17.3454914093 353.687376447 0.131577338534
20.4595146179 354.137758176 0.273622452305
19.7858791351 354.050187442 -0.00704405022481
19.902797699 353.778813957 0.175778042668
18.2294845581 354.336950212 0.401872753322
18.9011459351 354.120251358 0.28414146907
19.0355453491 354.411463222 0.0591221922045
20.4725131989 354.243598285 -0.122961972016
20.6798629761 353.836602997 0.315215447099
20.4521636963 353.967909048 0.503205607143
20.1573982239 354.123297935 0.263396129616
18.4779033661 353.697454615 0.167720851618
20.4136695862 354.261324671 0.413101523737
18.4068603516 353.776892307 0.383776262804
20.768529892 354.148197211 0.272716447296
20.6918735504 353.772063056 0.204090822152
19.7225379944 354.000288046 0.034990530437
20.6375160217 354.130913349 0.253529045664
18.2700500488 354.062403818 0.195034375723
20.8740940094 354.320641579 0.610308793629
18.6154136658 354.500073233 0.348802924571
19.1974525452 354.051963124 -0.0104478003947
18.0851554871 354.132696944 0.261981493945
17.3893737793 354.327238262 -0.0689282303221
14.2582025528 354.139093751 0.522187664388
19.2623462677 354.608962703 0.238686219072
20.5038585663 354.420737522 0.390969320675
20.5820713043 354.314658295 0.369437544852
19.1426525116 354.345502083 0.592893562662
19.5131454468 354.124147362 0.0870786247304
18.8242397308 354.504186481 0.579652279376
17.2792873383 353.906718646 0.559445093614
14.7384052277 354.005931691 0.523416410438
20.7257099152 354.254493453 -0.155201367335
20.9284591675 353.772381891 0.193674226879
13.6290912628 353.78820562 0.19478140929
19.5346755981 354.167097427 0.71813223385
20.8863677979 353.969443796 0.371168562076
20.7714157104 353.656352086 0.373629680536
20.8353347778 353.782127711 0.178571917668
20.6437854767 354.154834725 0.324626994346
20.971824646 354.41606377 0.516581502417
20.2869033813 353.810348681 0.210788100679
16.9783706665 354.049514814 -0.00724100884407
20.0406150818 353.96828113 0.50408017465
20.7936592102 354.052646202 0.651555894983
18.9776115417 353.813002692 0.0431751024695
19.7753562927 353.787151327 0.168867939412
18.3592739105 353.974654925 -0.0526869356904
20.5487289429 354.517980907 0.099163892742
19.068151474 353.81351478 0.109560893854
20.2517337799 354.50014517 0.349795125821
20.7397098541 353.766792776 0.190067330392
18.0893936157 353.95565938 0.443641734208
17.4061317444 353.909572528 0.561495529725
18.6634140015 354.009534688 0.259499435834
18.5134773254 354.12119949 0.206798234143
20.2588653564 353.953250532 0.68778050492
18.6943149567 354.364551387 0.561620102198
20.2765350342 353.799169775 0.62228175443
17.1808643341 353.778856528 0.188055442495
20.9718284607 354.415645627 0.385924266731
19.8102169037 353.648212305 0.21896971321
19.273223877 353.784398262 0.191140205681
16.9305744171 353.888197926 -0.119252825427
18.3762874603 354.400737307 0.668011587146
18.172000885 354.065530938 0.279969909289
16.3904190063 354.251356897 0.287852855228
18.206993103 353.776415127 0.179503145203
20.595041275 353.771618562 0.192106871541
17.6377124786 353.807036582 0.206669843368
18.2434120178 354.096364932 0.612406990761
19.2790966034 353.774799856 0.197129013982
18.2689170837 353.7932885 0.0626957732096
20.2794723511 353.77641213 0.201547360214
20.4334335327 354.277259471 -0.0600861340941
20.7586612701 354.245825553 -0.064111686593
17.5448246002 354.362856773 0.559772362153
19.1910743713 353.965766579 0.333501601164
20.2890529633 354.123706959 0.30410486367
18.0810108185 353.774676252 0.184537816948
19.1699619293 354.057417012 -0.188160056742
20.1917877197 353.740481036 0.0460662129511
20.3667736053 353.677631085 0.121455076137
19.9091835022 354.217676001 0.50755385582
20.3052711487 354.361783763 0.00101758640743
19.3947906494 353.847970903 0.324186170966
20.1512317657 354.281791709 -0.128774402014
18.8334827423 353.812766985 0.0421576972832
16.7360801697 353.952597301 0.442994087375
17.7051830292 353.983521925 0.310812101197
18.7230854034 353.954530412 0.444336580937
18.4848976135 354.194912969 0.618338780254
20.8857707977 353.776770614 0.382930170615
20.9593372345 354.278798146 0.218996290219
20.3701133728 353.981073758 -0.0598517343759
20.2380371094 354.173444465 -0.0653147213056
17.3509654999 354.032340067 0.573696524146
18.540096283 353.990646895 0.0489646492848
20.0046730042 354.312498443 0.340163253555
16.1320266724 354.349482989 0.479172580539
20.3810138702 354.489118193 -0.0422383773153
19.7290992737 354.411460527 0.0596247135287
18.140253067 353.638289237 0.276151986446
19.7750263214 353.89604184 0.526245240057
20.4265899658 354.334383411 0.404497901529
19.6925182343 354.417847135 0.388956558104
20.1373577118 353.922911351 0.0381392272181
20.3622932434 353.948295094 0.0439602827477
20.2777690887 354.438404032 0.0605402103585
18.3768939972 353.773373445 0.199841699846
20.0279979706 354.154103665 0.710430443366
17.927110672 354.30849743 0.180443749076
20.76603508 354.275610951 0.631571670149
14.5719184875 353.858711899 0.635480952871
18.1235542297 354.038093406 -0.122732349316
20.8175430298 354.162705006 0.574596235369
20.7755317688 354.51754469 0.124353046727
20.2245674133 353.687954293 0.13137312744
20.3967704773 353.826019538 0.339442864183
16.1343021393 353.820747313 0.181573101529
18.6432209015 353.810288314 0.040510892541
20.2281112671 354.144132071 0.270540339667
20.7242546082 354.346470011 0.593396195776
17.0035400391 354.373959517 0.535818475488
17.8521270752 353.781074304 0.19171868214
20.1489448547 354.243777727 -0.122001078585
20.0881175995 353.838892152 0.318852191387
19.3797454834 354.374096016 0.536177134243
18.9374046326 354.25038874 -0.149825580634
20.1368122101 353.845464623 0.324051286797
18.4129180908 353.83895275 0.317552872276
20.1470832825 354.596322022 0.365468234345
19.0650959015 354.41608917 0.243250383417
19.3936748505 354.242423353 0.578304885098
17.6671600342 353.790923932 0.193695318035
16.1844406128 354.005065067 0.687568715032
19.5902194977 354.428606481 0.347551396159
17.0614395142 353.72613953 0.0840252421795
18.0631828308 353.651061567 0.207604148423
18.8328018188 354.50419749 0.579660843132
18.7593994141 354.14374 0.779275386463
20.4479827881 354.136530328 0.273850132705
18.8493976593 354.13181918 0.263709828689
20.1556472778 354.251700295 0.285402045519
19.6977462769 353.974223617 -0.05278817123
20.9577293396 353.957035412 0.450335378214
18.524520874 354.282233722 -0.128685116153
18.4434967041 354.345670627 0.380731994098
18.9355888367 354.205482696 -0.0148438144947
18.6067447662 354.038074105 -0.122898671067
16.9842453003 353.80296555 0.334060390097
16.711353302 353.697554934 0.166886330654
17.7737045288 354.097382154 0.069543810894
20.5700683594 354.364225214 0.389336126146
19.1767082214 354.058189501 0.0591261685142
18.7379684448 354.118412337 0.315838725123
18.7531967163 353.99658002 0.402107716285
20.9295425415 354.250367829 0.247078235341
17.1346416473 354.096455018 0.611141945664
19.2492904663 354.101558016 -0.156948954537
18.8405780792 354.358108168 0.382214961406
20.0130233765 354.143738163 0.780404387882
19.6516952515 353.810591257 0.433245840488
18.0559749603 354.437502039 0.485313846843
19.2903575897 353.964246718 0.368987907104
17.9552955627 354.100762803 -0.15592019563
16.5183334351 354.357308387 0.384246786134
18.4106636047 354.28925791 0.644977252899
18.1911201477 354.256609341 0.280268940873
20.7734775543 353.86619048 0.558742551227
20.5671977997 354.138302347 0.274834911716
18.124168396 353.777303183 0.183137601477
19.019411087 354.141572507 0.274635712138
19.515920639 353.78170085 0.261123817063
19.6476554871 354.144592075 0.265945317575
18.399055481 354.131507057 0.261777180224
18.5753536224 354.415673827 0.242087536754
17.6117553711 354.175899283 -0.068168091428
20.2705116272 353.793178089 0.196423553046
19.1953201294 353.907776946 0.560649151813
19.2047672272 353.829238959 -0.0672504856319
20.3723773956 353.677631631 0.121456124598
19.7009162903 354.010143755 0.689332109923
18.8045043945 354.126974158 0.301998930704
18.5570850372 354.406977394 0.129555082536
18.9893684387 353.91353104 0.00695623959925
20.448431015 354.21845033 0.228259358776
19.9411907196 354.497569163 -0.0319254432364
20.3022270203 354.283366203 0.370290308905
19.2421875 354.176189592 0.210291189932
16.7245635986 354.139719932 0.165153237564
19.349357605 353.683362812 0.182810336962
20.5688743591 354.418057311 0.238091282999
19.7411346436 354.390713277 0.0156418550247
14.3487014771 354.005958392 0.523400336384
20.3439254761 353.85540473 0.632092812239
17.5421028137 354.021580154 0.0813335307901
14.0113153458 354.115104867 0.302083307
19.5809459686 353.838922751 0.316740404223
18.0281295776 353.648673372 0.218831793867
20.6823139191 354.00006375 0.687030629951
19.8583316803 354.250858282 -0.156865383439
20.7876148224 353.89473099 0.0889101897067
19.9254550934 354.12632167 0.268598680519
14.9380426407 353.888605568 -0.118383649513
17.0246982574 354.139367761 0.522662070356
20.3688850403 353.96831825 0.503374877481
19.9560604095 354.061690971 -0.0950426108447
19.8523292542 354.430823782 0.122328525297
20.989528656 354.284990166 0.19526521591
18.4314537048 354.245616182 0.581442761682
18.3396568298 354.229425032 0.100296630673
18.0930709839 354.126181802 0.752469881642
19.5836315155 354.490227911 0.29286265284
16.5249824524 354.315385933 -0.109272285958
17.7540340424 354.282914534 0.545628953258
20.524181366 353.795267935 0.155274547818
20.3826332092 354.390585385 0.567632841262
20.7617053986 354.16701967 0.105789612
19.3813018799 354.402774167 0.162188707757
20.8909816742 353.758125312 0.00998553584587
19.5226554871 354.418624528 0.610559763702
19.9915008545 353.829226233 0.324199765636
20.8641166687 354.255068552 -0.145153160433
20.5330963135 354.31131738 0.336524513359
19.7432479858 353.992220274 -0.0556623947115
16.8282699585 353.951645172 0.685724381317
20.7723655701 353.656353932 0.373630025253
18.9505977631 353.793226374 0.191676265018
19.5391998291 354.018903347 0.0809616693488
18.3016891479 353.940634558 -0.118871321956
19.967628479 354.352303299 0.390627542232
20.2155151367 354.143536508 0.301747205232
20.1480026245 354.363225651 -0.1267631579
20.4708251953 354.280377392 -0.0056078548838
20.5263252258 354.26694309 0.548838589435
20.1274623871 354.349780588 0.405779011082
20.5445270538 354.000309642 0.0350147874956
18.8337497711 354.251574237 0.287279054401
19.2130832672 354.289938983 0.402898514209
19.9784965515 354.363461611 0.387679947877
19.7251434326 354.292482333 -0.148059125759
19.4788188934 353.767480498 0.181234470193
18.881570816 354.412277989 0.189876455014
16.8166255951 354.595603241 0.3641509751
16.8577766418 353.955890139 0.446297971218
17.3528614044 353.963529895 0.604251554461
18.8370552063 354.114653075 0.00127309902965
19.9279022217 354.197217385 0.621832350493
19.8858451843 354.11572924 0.00190851895807
20.5952854156 353.851638488 0.437653337519
17.7435359955 354.354829918 0.38207264478
19.6412773132 354.249151495 -0.151357904297
19.8725128174 354.45198076 0.570695582908
18.8914966583 354.174828421 -0.062981013726
20.6696205139 354.108543049 0.284620934076
19.0001907349 354.164136428 0.450099754548
20.6629695892 354.147338802 0.289618671636
19.5231895447 354.339712591 -0.0402935602668
19.4487037659 354.430240016 0.455499611044
19.751373291 353.781206554 0.201483429037
18.3164844513 354.180472811 0.0965993515748
20.8784294128 354.121954434 0.201822496177
18.4680843353 354.352689074 0.052163749285
16.3621044159 354.00626529 0.523365333261
17.8103199005 353.780324347 0.190125162747
18.6254062653 353.922298654 0.315050505141
19.9920902252 354.331364114 0.393963115743
15.3132343292 354.24937997 -0.159152965849
19.267868042 353.940295023 -0.000945664161592
20.6211605072 354.251018326 0.215272026593
18.1122112274 353.656613315 0.199697144095
17.9773750305 354.081064642 -0.107869744525
20.7639751434 354.13463736 0.252833655952
20.7550830841 354.119876611 0.691472543325
16.4234161377 354.285935789 0.678029417462
20.4043006897 353.877995266 -0.120467692545
18.8746929169 353.784478792 0.181388627117
20.3026771545 354.250911797 0.178386892877
18.5731239319 354.139629981 0.164672893469
18.7882442474 354.132942489 0.261733347583
19.7176055908 353.98722887 0.381293228193
19.2622470856 353.786480729 0.178845767455
19.8354282379 354.361909537 0.391260037053
20.8760166168 354.307894113 0.612739517747
20.17278862 354.229182113 0.399971658617
18.4224891663 354.358845593 0.381389445496
19.2897529602 353.922752438 0.301752169271
19.721912384 353.957808683 0.369782698525
17.0307445526 354.315104899 -0.110718354216
20.9530982971 353.700760119 0.537016051686
19.3769931793 354.431037923 0.122721222675
19.7090911865 354.113652766 0.28904944906
19.4582672119 353.951506342 -0.13565160044

Inspecting all of these reveals only a single object @ 354.282916,0.21135. They're basically entirely false objects from star-spikes or deblender problems.

new target


In [582]:
newtarget = SkyCoord(354.282916*u.deg, 0.21135*u.deg)
newtarget.to_string('hmsdms', sep=' ', precision=2)


Out[582]:
u'23 37 07.90 +00 12 40.86'

In [581]:
allbricktab[point_in_brick(allbricktab, newtarget)]


Out[581]:
<Table masked=False length=1>
bricknamebrickidbrickqbrickrowbrickcolradecra1ra2dec1dec2has_image_ghas_image_rhas_image_zhas_catalog
string64int32int16int32int32float64float64float64float64float64float64boolboolboolbool
3543p00233322533611417354.3750.25354.25354.50.1250.375TrueTrueTrueTrue

In [553]:
imgd = fits.getdata('decals_images/decals-3543p002-image-r.fits')

#estimated from the image
apcen = (3070.4872, 1266.6247)
aprad = 34.8

plt.figure(figsize=(5, 5))
plt.imshow(imgd[apcen[1]-aprad*2:apcen[1]+aprad*2, 
                apcen[0]-aprad*2:apcen[0]+aprad*2], vmin=-.02,vmax=.1)
plt.tight_layout()



In [567]:
xg, yg = np.meshgrid(np.arange(imgd.shape[0]), np.arange(imgd.shape[1]))
dx = xg-apcen[0]
dy = yg-apcen[1]
dist = (dx*dx + dy*dy)**0.5
#use this to sanity check that the transposes are right and such
plt.figure(figsize=(3, 3))
plt.imshow(dist[apcen[1]-aprad*2:apcen[1]+aprad*2, 
                apcen[0]-aprad*2:apcen[0]+aprad*2])
plt.colorbar();



In [579]:
sorti = np.argsort(dist.ravel())
sortd = dist.ravel()[sorti]
dmsk = sortd<(aprad*2)
cumflux = np.cumsum(imgd.ravel()[sorti][dmsk])
mags = 22.5 - 2.5*np.log10(cumflux)
plt.plot(sortd[dmsk], mags)

plt.axvline(aprad, color='k')
apmag = np.interp(aprad, sortd[dmsk], mags)
plt.axhline(apmag, color='k')

fiber2mag = np.interp(2/0.2637, sortd[dmsk], mags)
fiber3mag = np.interp(3/0.2637, sortd[dmsk], mags)

plt.xlabel('pix from center')
plt.ylabel('mag enclosed')
plt.ylim(16,21)
plt.tight_layout()
apmag, fiber2mag, fiber3mag


Out[579]:
(18.509351063711748, 21.336375404855975, 20.47029935474184)

Check out some bricks to see what match/non-matches look like

This can be used to look at the DECALS bricks to compare the catalogs with SDSS. Pick a brick, and choose it using the cell immediately below this one. Then open up a ds9 window viewing whichever bands/images you want for that brick. Then execute the rest of the cells to get regions marked in DS9 for various comparisons.

(Note that it's important this get executed after the preceding section: d2d, idx, and related variables are used here)


In [495]:
brick = '3543p002'

In [496]:
!ls decals_images/*{brick}*.fits


decals_images/decals-3543p002-image-r.fits decals_images/decals-3543p002-resid-r.fits

In [506]:
utils.skycoord_to_regions(newtarget) # for the interesting target above

In [500]:
#DECALS location of non-matched things
nonmatchcat = decamcat30am[de_rmag30am < 21][d2d.arcsec>1]
nonmatchscs = decamscs30am[de_rmag30am < 21][d2d.arcsec>1]
inbrick = nonmatchcat['brickname']==brick
utils.skycoord_to_regions(nonmatchscs[inbrick], 'circle', ['{0:.1f}" # color = red'.format(r) for r in de_rads30am[inbrick]])
utils.skycoord_to_regions(nonmatchscs[inbrick], 'text', ['"{0:.1f}"  # color = red'.format(m) for m in de_rmag30am[de_rmag30am < 21][d2d.arcsec>1][inbrick]])

In [485]:
#DECALS location of matches things
matchcat = decamcat30am[de_rmag30am < 21][d2d.arcsec<1]
matchscs = decamscs30am[de_rmag30am < 21][d2d.arcsec<1]
inbrick = matchcat['brickname']==brick
utils.skycoord_to_regions(matchscs[inbrick], 'circle', '0.7" # color = green')
utils.skycoord_to_regions(matchscs[inbrick], 'text', ['"{0:.1f}"  # color = green'.format(m) for m in de_rmag30am[de_rmag30am < 21][d2d.arcsec<1][inbrick]])


#the SDSS location of the matches
sdssmatchcat = sdsscat30am[idx[d2d.arcsec<1]]
sdssmatchscs = sdssscs30am[idx[d2d.arcsec<1]]
sscs = sdssmatchscs[decamcat30am[de_rmag30am < 21][d2d.arcsec<1]['brickname']==brick]
scat = sdssmatchcat[decamcat30am[de_rmag30am < 21][d2d.arcsec<1]['brickname']==brick]
utils.skycoord_to_regions(sscs, 'circle', '1.1" # color = blue')
utils.skycoord_to_regions(sscs, 'text', ['"{0:.1f}"  # color=blue'.format(m) for m in scat['r']])

In [507]:
#all DECALS objects in the brick
inbrick = decamcat['brickname']==brick

#utils.skycoord_to_regions(decamscs[inbrick], 'circle', ['{0:.1f}" # color = white'.format(r) for r in de_rads[inbrick]])
utils.skycoord_to_regions(decamscs[inbrick], 'text', ['"{0:.1f}"  # color = white'.format(m) for m in de_rmag[inbrick]])

In [508]:
#all SDSS objects in the brick
brickinfo = allbricktab[allbricktab['brickname']==brick]
inbrick = (brickinfo['ra1']<sdsscat['ra'])&(sdsscat['ra']<brickinfo['ra2'])&(brickinfo['dec1']<sdsscat['dec'])&(sdsscat['dec']<brickinfo['dec2'])

utils.skycoord_to_regions(sdssscs[inbrick], 'circle', '2.5" # color=magenta')
utils.skycoord_to_regions(sdssscs[inbrick], 'text', ['"{0:.1f}"  # color=magenta'.format(m) for m in sdsscat['r'][inbrick]])

Simple aperture photometry on the new target

requires brick


In [509]:
f = fits.open('decals_images/decals-3543p002-image-r.fits')

In [ ]: